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

Folder move

New Here ,
Apr 30, 2008 Apr 30, 2008

Copy link to clipboard

Copied

Hi,

Does anyone know how to move a folder from one location to another without actually copying the contents of the folder and deleting the original folder?

I tried folderObj.rename and folderObj.chandPath without success.

Thanks
Raphael
TOPICS
Actions and scripting

Views

481

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
Adobe
Explorer ,
Apr 30, 2008 Apr 30, 2008

Copy link to clipboard

Copied

> Does anyone know how to move a folder from one location to another without actually copying the contents of the folder and deleting the original folder?
>

You can't do it using the PSJS API. You have to do a copy/delete.

-X
--
for photoshop scripting solutions of all sorts
contact: xbytor@gmail.com

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
Valorous Hero ,
May 02, 2008 May 02, 2008

Copy link to clipboard

Copied

I am going to get shouted at here, but on windows NOT Mac it can be done, it is undocumented. Use it at your own peril!

var folder = new Folder("c:/Fred");
folder.rename("c:/Fred2");

Paul.

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
New Here ,
May 02, 2008 May 02, 2008

Copy link to clipboard

Copied

>Does anyone know how to move a folder from one location to another without actually copying the contents of the folder and deleting the original folder?

What OS are you on? Are you moving between disks, or to a new location on the same disk? If you're moving between disks, there's no other way than to copy/delete.

Carl.

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
New Here ,
May 02, 2008 May 02, 2008

Copy link to clipboard

Copied

I have done what you are looking for but using Visual Basic!
Would you like to have the code?

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
New Here ,
May 02, 2008 May 02, 2008

Copy link to clipboard

Copied

Thanks Everyone for the response. I am using Javascript on Mac OS 10.5 and the folder move is on the same disk.

Thanks
Raphael

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
New Here ,
May 05, 2008 May 05, 2008

Copy link to clipboard

Copied

LATEST
Your best solution would be to use AppleScript or an Automator Action (or even a shell script) on the Mac to perform file management.

You can write an AS to move the files, then call a JS to perform the Photoshop work, or write an AS that does everything.

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