Skip to main content
Known Participant
February 12, 2021
Answered

I want to move the file in active document

  • February 12, 2021
  • 1 reply
  • 2008 views

var path1="E:/FG/";
Folder((fnp = (fle = (aD = activeDocument).name).parent + '/USED IMAGE/')).create(), File(fle).remove()
aD.saveAs(File(fnp + aD.name), new JPEGSaveOptions()),aD.saveAs(File(path1+aD.name), new JPEGSaveOptions()),aD.close(SaveOptions.DONOTSAVECHANGES);

 

I wish in active document of image file move the directory and don't close the file.. Is that possible ??

Thanks in Advance

This topic has been closed for replies.
Correct answer Kukurykus

I mean move the layer to directory and without close..


So not the file, but the layer? Then you can't move it, but export...

1 reply

Kukurykus
Legend
February 12, 2021

Use rename method or others, more complicated: To move files and folders

MXKSAuthor
Known Participant
February 12, 2021

I want to move the active document in directory. And Don't close the file

This script work only Active Document.

Kukurykus
Legend
February 12, 2021

After you move file it lose its original path, so you must save it using new location.