I use the following AppleScript script to automatically connect a remote drive when my VPN connection is established using Viscosity:
do shell script "sleep 5" tell application "Finder" mount volume "smb://some.domain.here/projects" end tell
This works ok. However this does not read the contents of the folder. So when I go to this folder for the first time, it takes extra 30 seconds to retrieve the list of files and folders.
Is there a way to tell Finder to pre-load the content of this network (!) folder in the background, without activation (it is ok to change Finder's folder to /Volumes/projects)? I tried to get a list of files into a variable. I get file names in the variable but the Finder window still tries to pull files again. I tried to "ls /Volumes/projects" but the Finder stills loads files on its own.
The folder is read-only.