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

Saving files to their subfolders

Guest
Oct 26, 2013 Oct 26, 2013

Copy link to clipboard

Copied

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

Views

597

Translate

Translate

Report

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.

Votes

Translate

Translate
Adobe
Guest
Oct 26, 2013 Oct 26, 2013

Copy link to clipboard

Copied

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

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

LATEST

Thank you very much for your help!

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

Votes

Translate

Translate

Report

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