Link to home
Start Free TrialLog in
Avatar of everycloud
everycloudFlag 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!
SOLUTION
Avatar of strung
strung
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of bbao
bbao
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial