all i want to do is execute a simple tar command with an --exlude option.
if i type the command into the terminal it works exactly as it should.
cd "/Volumes/COLD STORAGE/144000-144999/144073"; gnutar czvf "/Volumes/Cold_Storage_5/144000-144999/144073.tgz" * --exclude="print drive"/*
if I try to process that command with applescript using
set command to "cd \"/Volumes/COLD STORAGE/144000-144999/144073\"; gnutar czvf \"/Volumes/Cold_Storage_5/144000-144999/144073.tgz\" * --exclude=\"print drive\"/*"
do shell script command
it does work correctly. The files get tarred, but it does not issue the exclude command
if i try to process that command using
set command to "cd \"/Volumes/COLD STORAGE/144000-144999/144073\"; gnutar czvf \"/Volumes/Cold_Storage_5/144000-144999/144073.tgz\" * --exclude=\"print drive\"/*"
do script command
it works perfectly in applescript. However, the rest of my script rely’s on this command being executed, and since do script doesn’t wait for the command to be processed the rest of my script fails.
if i try to write the string to a file and then use do shell script to execute that file, it still does not see the exclude command.
if i try to use that exact same file that the applescript wrote the string to, in the terminal manually, it works.
the problem is not related to using wildcards. (the command WORKS in the terminal)
the problem is not related to quotes in the wrong places, or not using single quotes. (again, the command WORKS in the terminal, and applescript WRITES the information to a file correctly, which is then CORRECTLY executed in the terminal.)
I have tried every variation of the exclude command.
I have tried it with local folders, with no luck.
I believe the PROBLEM is with the APPLESCRIPT command do shell script
but, I can’t believe that someone somewhere else, has never needed to issue the --exclude command with applescript before.
could someone please try this scenario, in their environment and let me know if it works.
Thanks in advance,
-Pendal