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, DavideBarranca, Paul MR

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.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~oO~~Oo~^~~~
http://bit.ly/photoshopScripting
http://bit.ly/ts-timeslice
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

supriyala
Posts: 1
Joined: Tue Mar 05, 2019 9:54 am

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

Post by supriyala »

Excellent topic. I got valuable information from here. thank you!

tocnaza
Posts: 1
Joined: Fri Mar 22, 2019 10:25 am

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

Post by tocnaza »

Hello Anil!

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

Best regards,

Smitashinde
Posts: 1
Joined: Thu Sep 26, 2019 6:23 am

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

Post by Smitashinde »

Excellent post. Thanks for sharing!

Swapnil89
Posts: 1
Joined: Mon Dec 02, 2019 6:48 am

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

Post by Swapnil89 »

Hello Anil!

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

Best regards,

User avatar
Kukurykus
Posts: 225
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? :?