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

one path back from originalDocPath scripting

New Here ,
Oct 14, 2022 Oct 14, 2022

I'm using scripts to save PDFs in various formats in various folders. 

 

var PRINT = Folder(originalDocPath + "/Print");
if (!PRINT.exists) {
    PRINT.create();
}
var _pdfFileName = PRINT.fsName + "/" + originalDocName + "_PRINT.pdf";
var dest = Folder(PRINT);

My Folder structure looks like this.Screenshot 2022-10-14 at 09.01.36.pngexpand image\

Currently I have to have the document saved in the enclosing folder (5000_ABC_Example) but I want to have it in the Artwork folder. 

Basically how do I direct to:

originalDocPath but back one folder?
TOPICS
Scripting
468
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

Advisor , Oct 14, 2022 Oct 14, 2022

@Kyle26205577rhrw,

 

I see now...

Give this a try...

 

 

 

var LOWRES = Folder(originalDocPath.parent + "/Low Res");
if (!LOWRES.exists) {
    LOWRES.create();
}
var _pdfFileName = LOWRES.fsName + "/" + originalDocName + "_LR.pdf";
var dest = Folder(LOWRES);

 

 

 

Regards,

Mike

Translate
Adobe
LEGEND ,
Oct 14, 2022 Oct 14, 2022

Simple URI notation:

 

\..\Artwork

 

Mylenium

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
New Here ,
Oct 14, 2022 Oct 14, 2022

Hi, thanks for the fix.

var LOWRES = Folder(originalDocPath + "\..\Low Res");
if (!LOWRES.exists) {
    LOWRES.create();
}
var _pdfFileName = LOWRES.fsName + "/" + originalDocName + "_LR.pdf";
var dest = Folder(LOWRES);

creates a new folder - 

Screenshot 2022-10-14 at 09.19.15.pngexpand image

What am I doing wrong?

 

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 ,
Oct 14, 2022 Oct 14, 2022

@Kyle26205577rhrw 

 

It's not clear from your screen shot where the new "LOWRES" folder is being created.

 

Regards,

Mike

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
New Here ,
Oct 14, 2022 Oct 14, 2022

Hi @Mike Bro 

The script is creating a folder named "Artwork..Low Res" inside of "5000_ABC_Example".

I want it to create a folder inside "5000_ABC_Example" called "Low Res" (If it doesn't already exist) and save the new file in it.

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 ,
Oct 14, 2022 Oct 14, 2022

@Kyle26205577rhrw,

 

I see now...

Give this a try...

 

 

 

var LOWRES = Folder(originalDocPath.parent + "/Low Res");
if (!LOWRES.exists) {
    LOWRES.create();
}
var _pdfFileName = LOWRES.fsName + "/" + originalDocName + "_LR.pdf";
var dest = Folder(LOWRES);

 

 

 

Regards,

Mike

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
New Here ,
Oct 14, 2022 Oct 14, 2022

@Mike Bro 

That creates a folder outside of the folder 

Screenshot 2022-10-14 at 10.33.58.pngexpand image

But changing "\Low Res" to "/Low Res" fixed it.

I now have what I wanted 🙂

Screenshot 2022-10-14 at 10.37.47.pngexpand image

 

Thanks for your help

var LOWRES = Folder(originalDocPath.parent + "/Low Res");
if (!LOWRES.exists) {
    LOWRES.create();
}
var _pdfFileName = LOWRES.fsName + "/" + originalDocName + "_LR.pdf";
var dest = Folder(LOWRES);

 

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 ,
Oct 14, 2022 Oct 14, 2022
LATEST

@Kyle26205577rhrw,

Yes, I saw that and made edits to my post but you must have copied the code before hand.

 

Regards,

Mike

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