Avatar of everycloud
everycloud
Flag for United Kingdom of Great Britain and Northern Ireland

asked on 

Full Path Name to File on OSX El Capitan

Hi

I need to programmatically access a .TXT file via Javascript on my MacBook Air (OSX 10.11.6). I am a PC user and am not familiar with the file structure on a mac.

1. If I place the .TXT file on my desktop, what will the path be?
2. If I place the .TXT file in my Documents folder, what will the path be?

FYI, here is the simple Javascript that I'm playing with just now (I would prefer the path to be absolute and not a relative path as I'm not sure where the Javascript will be triggered from yet).

try{
myPath = "~/Desktop/source.txt";
$.evalFile(myPath);
eval(thisComp.name)[0];
}catch(err){
"MISSING";
}


Thanks very much for your help!
Mac OS XJavaScript

Avatar of undefined
Last Comment
Eoin OSullivan

8/22/2022 - Mon