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

Saving files to their subfolders

Guest
Oct 26, 2013 Oct 26, 2013

var savePath = new File( parentFolder.parent + '/' + name);

alert(savePath, 'Parent Folder Location', false);

newDoc.saveAs(savePath, saveOptions, false, Extension.LOWERCASE);

I can get to parent folder alert like this but it saves to the folder, not parent folder.

How can I do that?

TOPICS
Actions and scripting
647
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

Guru , Oct 26, 2013 Oct 26, 2013

Hard to say because you didn't post all the code. Normally I would have said that your problem is you can't use name as a variable. That is a property of app and returns 'Photoshop'.

If parentFolder is a Folder object you should get the parent folder.

Translate
Adobe
Guest
Oct 26, 2013 Oct 26, 2013

var savePath = new File( parentFolder.parent + '/' + name);

I deleted "+ '/' + name" and now it works.

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
Guru ,
Oct 26, 2013 Oct 26, 2013

Hard to say because you didn't post all the code. Normally I would have said that your problem is you can't use name as a variable. That is a property of app and returns 'Photoshop'.

If parentFolder is a Folder object you should get the parent folder.

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
Oct 26, 2013 Oct 26, 2013
LATEST

Thank you very much for your help!

I pasted the code in: http://forums.adobe.com/thread/1322581?tstart=0

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