PDA

View Full Version : failed to run shell script


seagrb
03-14-2009, 07:39 AM
hi there,

i want to rename the created sparseimage via the following script:

tell application "Finder"
activate
set name of document file "test.sparseimage" of disk "BACKUP" to "test1234.sparseimage"
end tell

unfortunately i get the error message "failed to run shell script rename.scpt"

the error log tells me:

...
| 10:17:42 AM | Info | ...ACTION: Restoring Spotlight state on test
| 10:17:42 AM | Info | ......COMMAND => Restoring Spotlight search indexing state on test
| 10:17:42 AM | Info | ...ACTION: Running shell script rename test.scpt
| 10:17:42 AM | Info | ......COMMAND => Invoking After Copy shell script: /Volumes/BACKUP/rename test.scpt
| 10:17:42 AM | Error | sh: /Volumes/BACKUP/rename test.scpt: cannot execute binary file

what am i doing wrong?

dnanian
03-14-2009, 10:16 AM
Well, that's not a shell script: it's an AppleScript. You need to write a shell script.