• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

I want to move the file in active document

Participant ,
Feb 12, 2021 Feb 12, 2021

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

TOPICS
Actions and scripting

Views

721

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Feb 12, 2021 Feb 12, 2021

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

Votes

Translate

Translate
Adobe
LEGEND ,
Feb 12, 2021 Feb 12, 2021

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Feb 12, 2021 Feb 12, 2021

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 12, 2021 Feb 12, 2021

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Feb 12, 2021 Feb 12, 2021

Copy link to clipboard

Copied

dsd.JPG

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Feb 12, 2021 Feb 12, 2021

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Feb 12, 2021 Feb 12, 2021

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Feb 12, 2021 Feb 12, 2021

Copy link to clipboard

Copied

It's not execute the script. Last Line is getting a error..

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Feb 12, 2021 Feb 12, 2021

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 ...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Feb 12, 2021 Feb 12, 2021

Copy link to clipboard

Copied

I have edited the code. Try again - there was an error in the first line.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Feb 12, 2021 Feb 12, 2021

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..

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Feb 12, 2021 Feb 12, 2021

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 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Feb 12, 2021 Feb 12, 2021

Copy link to clipboard

Copied

sf.JPG

I want to move the image file from document.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 12, 2021 Feb 12, 2021

Copy link to clipboard

Copied

You say it closes the file in Photosop, when exactly?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 12, 2021 Feb 12, 2021

Copy link to clipboard

Copied

So you want to move or copy the file?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Feb 12, 2021 Feb 12, 2021

Copy link to clipboard

Copied

I want to move the file without closing file in photoshop

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 12, 2021 Feb 12, 2021

Copy link to clipboard

Copied

So save it in new location, and then remove the original 😉

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Feb 12, 2021 Feb 12, 2021

Copy link to clipboard

Copied

sf.JPG

I want to move the image file from document and without close the image file

Move the File 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 12, 2021 Feb 12, 2021

Copy link to clipboard

Copied

Do you mean export the layer?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Feb 12, 2021 Feb 12, 2021

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 12, 2021 Feb 12, 2021

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines