Copy link to clipboard
Copied
I have an image in folder in download\TEST, I want create a new sub-folder in test and save image to it
var myDocument = activeDocument;
var f = new Folder(myDocument.path+theResult.join("X"))
if (!f.exists) {
f.create();
theResult.join("X") is a variable stored values from another function whitch is 2X3, above code created folder
download\TEST2X3 instead download\TEST\2x3 (result I want)
How to fix it ? thank you
Copy link to clipboard
Copied
@Calvin21914323wi10 I'm gonna put money down that @Stephen_A_Marsh is the guy to help you with this one!
Copy link to clipboard
Copied
@Sef McCullough – thanks, no pressure!
There are many scripters here who I believe can also help...
Copy link to clipboard
Copied
@Calvin21914323wi10 – Untested, but perhaps:
var f = new Folder(myDocument.path+"/"+theResult.join("X"));
Or:
var f = new Folder(myDocument.path+"\\"+theResult.join("X"));
Copy link to clipboard
Copied
Second one, works, thank ou very much
Copy link to clipboard
Copied
@Calvin21914323wi10 - Thanks for the feedback, please mark my previous reply as the correct answer. I would have thought that both versions would have resulted in a valid directory separator being added.