Page 1 of 1

How to get/convert Windows path not /d/ps-projects/ but D:\ps-projects\

Posted: Fri Jan 25, 2019 10:56 am
by AnilTejwani
Hi Guys,

I was wondering if it would be possible to convert the jsx path (example /d/ps-projects/a/b/c/) to windows path (i.e. d:/ps-projects/a/b/c/ or d:\ps-projects\a\b\c\)

Thanks in advance.

Anil

Re: How to get/convert Windows path not /d/ps-projects/ but D:\ps-projects\

Posted: Fri Jan 25, 2019 11:19 am
by Geoff
$.writeln(decodeURI(activeDocument.fullName.fsName));

Re: How to get/convert Windows path not /d/ps-projects/ but D:\ps-projects\

Posted: Fri Jan 25, 2019 1:32 pm
by Geoff
Sorry you just wanted the path....

$.writeln(decodeURI(activeDocument.path.fsName));

Re: How to get/convert Windows path not /d/ps-projects/ but D:\ps-projects\

Posted: Sat Jan 26, 2019 1:52 am
by AnilTejwani
Geoff wrote: ↑Fri Jan 25, 2019 11:19 am $.writeln(decodeURI(activeDocument.fullName.fsName));
Thanks Geoff.
What i was missing was the .fsName bit, which I understand would be File System Name.

Thanks once again.

Re: How to get/convert Windows path not /d/ps-projects/ but D:\ps-projects\

Posted: Mon Dec 02, 2019 12:05 pm
by Kukurykus
Wasn't that actually posted higher? :?