Quantcast
Channel: Adobe Community: Message List - Photoshop Scripting
Viewing all articles
Browse latest Browse all 27456

Re: Save As in Parent Directory

$
0
0

How would the coding change for the following:

It is really hard to say how to change your code without seeing the code so we know how you are doing it now.

 

But here are some more examples for working with files.

 

var myFile = new File('~/desktop/04969/1234_1.bmp');
// different name
var myNewFile = new File( myFile.parent+'/1234_2.bmp');
alert(myNewFile);
// different folder
myNewFile = new File( myFile.parent.parent+'/'+myFile.name);
alert(myNewFile);
// or different folder this way
var myNewFolder = new Folder('~/desktop/temp');
myNewFile = new File( myNewFolder+'/'+myFile.name);
alert(myNewFile);
// new folder and new name
myNewFolder = new Folder('~/desktop/temp');
myNewFile = new File( myNewFolder+'/1234_3.bmp');
alert(myNewFile);

Viewing all articles
Browse latest Browse all 27456

Trending Articles