Search code examples
fileapplescriptafp

Checking if AFP server is already mounted applescript


How to I check if file server is currently connected? (Using AFP to connect) Sorry if Im asking this wrong.


Solution

  • if a server is mounted there is a corresponding volume in /Volumes.

    if "serverVolume" is in do shell script "ls /Volumes" then ... -- server is mounted
    

    Replace serverVolume with the name of the volume.