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

How do I move files through Extendscript?

Enthusiast ,
Feb 19, 2015 Feb 19, 2015

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
1.2K
Translate
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!\")'");

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

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

Translate
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

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

Translate
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
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!\")'");

Translate
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