Folder Below

Anyone, especially newbies, asking for help with Photoshop Scripting and Photoshop Automation - as opposed to those contributing to discussion about an aspect of Photoshop Scripting

Moderators: Tom, Kukurykus

ChilliJoe
Posts: 4
Joined: Thu Aug 04, 2016 5:02 pm

Folder Below

Post by ChilliJoe »

Hi guys,

I have a question. I would not save an image in the same folder but a below
e.g.
the image is in the folder

c:\pictures\shootings\Hans\PSD\

but I would like a folder below

c:\pictures\shootings\Hans\

var thedoc = app.activeDocument;
var docName = thedoc.name;
if (docName.indexOf(".") != -1)
{
var basename = docName.match(/(.*)\.[^\.]+$/)[1]
}
else {var basename = docName};

all should be dynamic, because the images can be in different folders
there I will then create a new folder, but I know how I do. Just not how do I get a folder back

c:\pictures\shootings\Hans\jpg\
can someone help me
pixxxelschubser
Posts: 26
Joined: Mon Aug 01, 2016 8:59 pm

Re: Folder Below

Post by pixxxelschubser »

How about:

Code: Select all

var fol = new Folder("/c/pictures/shootings/Hans/PSD/");
alert (fol.parent);
;)
ChilliJoe
Posts: 4
Joined: Thu Aug 04, 2016 5:02 pm

Re: Folder Below

Post by ChilliJoe »

Thanks,
this is easy :) :D