Cannot keep shell script running when script ends

I’m trying to leave shell script to run while applescript ends.
This does not work, please show me the right way…

ignoring application responses
	do shell script "cp filename1.mov filename2.mov"
end ignoring
display dialog "applescript done, but shell script still runs!"

Thanks,

Jukka

You need to tell the shell script to run in the background, which you do by appending “&” to the script:

do shell script "cp /file1.mov /file2.mov &"

The & is a standard shell option for running the process in the background so that you can run other tasks.

Still “Display Dialog” shows only after copy is done?

Jukka

Found the right way:


do shell script "cp /filename1.mov /filename2.mov > /dev/null 2>&1 &"
display dialog "Done"

So we needed to sent the output to /dev/null

Jukka