Copy link to clipboard
Copied
Hello,
I have created a script which archives images on a local server.
It works ok from Windows machines, but I can't figure out the path to the same location for the Mac clients.
I'm testing the paths using the below script, and none from the below options work:
var testPaths = new Array(
'\\\\xyz\\photo\\Portfolio\\', // for Win clients works fine
'afp://xyz/photo/Portfolio/',
'afp://xyz.local/photo/Portfolio/',
'afp://xyz._afpovertcp._tcp.local/photo/Portfolio/',
'afp://192.168.1.74/photo/Portfolio/',
'afp:\\\\xyz\\photo\\Portfolio\\',
'afp:\\\\xyz.local\\photo\\Portfolio\\',
'afp:\\\\xyz._afpovertcp._tcp.local\\photo\\Portfolio\\',
'afp:\\\\192.168.1.74\\photo\\Portfolio\\',
'Volumes/photo/Portfolio/' // this one works for Mac clients, when the share of local server is mounted
);
for (var key in testPaths)
{
if(new Folder(testPaths[key]).exists)
{
alert(testPaths[key]);
}
}
Please help,
Thank you
Copy link to clipboard
Copied
UNC links (i.e. \\server\path\to\share) are a Windows only solution that does not directly translate to Mac. Your working solution is likely the "Mac/Unix-way", i.e. mount the drive so it becomes a part of the filesystem.