Skip to main content
wckdtall
Inspiring
February 20, 2015
Answered

How do I move files through Extendscript?

  • February 20, 2015
  • 2 replies
  • 1203 views

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.

This topic has been closed for replies.
Correct answer wckdtall

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

2 replies

wckdtall
wckdtallAuthor
Inspiring
February 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

wckdtall
wckdtallAuthorCorrect answer
Inspiring
February 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!\")'");

Inspiring
February 20, 2015

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