Copy link to clipboard
Copied
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
So not the file, but the layer? Then you can't move it, but export...
Copy link to clipboard
Copied
Use rename method or others, more complicated: To move files and folders
Copy link to clipboard
Copied
I want to move the active document in directory. And Don't close the file
This script work only Active Document.
Copy link to clipboard
Copied
After you move file it lose its original path, so you must save it using new location.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
It's close the file in Photoshop , I want to move the file without close the image file in photoshop
Copy link to clipboard
Copied
Folder (path1=("E:/FG/")).create();
Folder((fnp = (fle = (aD = activeDocument).fullName).path + '/USED IMAGE/')).create();
File(fle).remove();
aD.saveAs(File(fnp + aD.name), new JPEGSaveOptions());
aD.saveAs(File(path1+"/" + aD.name), new JPEGSaveOptions());
I didn't understand the question a little. In the text you write one thing, and in the code - another.
You save the file twice:
- first time to USED IMAGE subdirectory
- second time to directory E: / FG /
Accordingly the file path changes twice
If you only need to put the file in a subfolder - remove the last line
Copy link to clipboard
Copied
It's not execute the script. Last Line is getting a error..
Copy link to clipboard
Copied
Remove the image file in original folder.
USED IMAGE Directory and Second Directory Move the image file from Original Foder , But In Photoshop don't close the file ...
Copy link to clipboard
Copied
I have edited the code. Try again - there was an error in the first line.
Copy link to clipboard
Copied
Folder (path1=("E:/FG/")).create();
Folder((fnp = (fle = (aD = activeDocument).name).path + '/USED IMAGE/')).create();
File(fle).remove();
aD.saveAs(File(fnp + aD.name), new JPEGSaveOptions());
aD.saveAs(File(path1+"/" + aD.name), new JPEGSaveOptions());
Getting error in 3no lines..
Copy link to clipboard
Copied
This is not my code. You have modified it.
activeDocument.name - it is a string that stores the name of the document. It has no path property
Copy link to clipboard
Copied
I want to move the image file from document.
Copy link to clipboard
Copied
You say it closes the file in Photosop, when exactly?
Copy link to clipboard
Copied
So you want to move or copy the file?
Copy link to clipboard
Copied
I want to move the file without closing file in photoshop
Copy link to clipboard
Copied
So save it in new location, and then remove the original 😉
Copy link to clipboard
Copied
I want to move the image file from document and without close the image file
Move the File
Copy link to clipboard
Copied
Do you mean export the layer?
Copy link to clipboard
Copied
I mean move the layer to directory and without close..
Copy link to clipboard
Copied
So not the file, but the layer? Then you can't move it, but export...