Hi, I’m having trouble with a script that zips files. If I have any spaces in the path the script doesn’t work.
This works fine:
set SourceFile to "/Volumes/HD2/testfile.pdf"
set DestinationFile to "/Volumes/HD2/testfile.pdf.zip"
do shell script "zip -r -j " & DestinationFile & " " & SourceFile & "* -x *.DS_Store"
This doesn’t work:
set SourceFile to "/Volumes/HD2/test file.pdf"
set DestinationFile to "/Volumes/HD2/test file.pdf.zip"
do shell script "zip -r -j " & DestinationFile & " " & SourceFile & "* -x *.DS_Store"
How can I modify the script so that it accepts spaces in the path?