Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Javascript Get the Current Path without %20 and / backslash

Guest
Jul 19, 2010 Jul 19, 2010

Hi,

If i trying to get my .indd path, it is giving the path with %20 and / backslash and ":" also missing.

How can i get my path with exact format because i need to pass the path as a argument to a bat file.

Please let me know if any idea u have.

TOPICS
Scripting
8.6K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Beginner , Jul 28, 2010 Jul 28, 2010

Use the folowing code:

Folder.decode(folderPath);//where folderPath is the file location.

Translate
Guide ,
Jul 19, 2010 Jul 19, 2010

#target indesign var docPath = app.activeDocument.filePath; $.writeln(unescape(docPath)); $.writeln(decodeURI(docPath));

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 19, 2010 Jul 19, 2010

Hi Mark,

Thanks for ur reply...

Its a fine and useful to me.

Thanks and Regards

Christy

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 28, 2010 Jul 28, 2010

Use the folowing code:

Folder.decode(folderPath);//where folderPath is the file location.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 16, 2014 Jul 16, 2014

I testing your solution now,

coming back very soon with result

thank you in advance sir.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 16, 2014 Jul 16, 2014
LATEST

well it works.

but this is not really what I was searching for indeed,

cause we have defined the whole path,

that should better if we could just go some levels back from the interface.jsx (cause that is the scriptfile we are running)

because we have like hundreds of jobs.

I dont want to each time there is a new job go and modify the jobnumber in the script

have you got a good  solution on this sir?

Thank you so much in advance sir

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Jul 19, 2010 Jul 19, 2010

Hey!

var documentPath = app.activeDocument.filePath.fsName;

tomaxxi

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 19, 2010 Jul 19, 2010

Hi tomaxxi,

Thanks for ur Answer.

It's working Fine. And once again thanks for ur needful Help

Regards

Christy

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines