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

How do I move files through Extendscript?

Enthusiast ,
Feb 19, 2015 Feb 19, 2015

Copy link to clipboard

Copied

I'd ask this in the general scripting forum, but it seems pretty dead over there. I created a script that parses the file name and saves it based on a location I would like, but for older files, I'd like to forego resaving it to preserve time stamps, and move these files to the new location, as they were sorted differently long ago. Is this possible? I found "changePath" in the general scripting documentation, but although it returns true, it doesn't actually move the file.

TOPICS
Actions and scripting

Views

926

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

Enthusiast , Feb 20, 2015 Feb 20, 2015

Here's an example for how to get this to work for those trying to do a similar thing on a mac:


app.system("osascript -e 'tell application \"finder\" to display alert(\"You did it!\")'");

Votes

Translate

Translate
Adobe
Advisor ,
Feb 19, 2015 Feb 19, 2015

Copy link to clipboard

Copied

Use app.system and pass it a command line that does what you need.

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
Enthusiast ,
Feb 20, 2015 Feb 20, 2015

Copy link to clipboard

Copied

Thanks again xbytor2‌! I found some docs at least allowing me to run terminal, which should help. Trying to figure out if I can run applescript as well, but it at least gets me part of the way! Really wish they'd document these things better.
how to run system command

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
Enthusiast ,
Feb 20, 2015 Feb 20, 2015

Copy link to clipboard

Copied

LATEST

Here's an example for how to get this to work for those trying to do a similar thing on a mac:


app.system("osascript -e 'tell application \"finder\" to display alert(\"You did it!\")'");

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