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

Discussion of Photoshop Scripting, Photoshop Actions and Photoshop Automation in General

Moderators: xbytor, Kukurykus, Tom

AnilTejwani
Posts: 15
Joined: Wed Feb 22, 2017 5:37 pm
Location: INDIA

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

Post 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

Geoff
Posts: 2
Joined: Thu Jan 24, 2019 8:18 pm

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

Post by Geoff »

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

Geoff
Posts: 2
Joined: Thu Jan 24, 2019 8:18 pm

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

Post by Geoff »

Sorry you just wanted the path....

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

AnilTejwani
Posts: 15
Joined: Wed Feb 22, 2017 5:37 pm
Location: INDIA

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

Post 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.

User avatar
Kukurykus
Posts: 240
Joined: Mon Jul 25, 2016 12:36 pm

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

Post by Kukurykus »

Wasn't that actually posted higher? :?