Here’s the script as it is right now:
tell application "System Events"
set AudioCeeDee to 1st disk whose format is audio format and local volume is true
set AudioNamen to name of AudioCeeDee
set Destinashun to 1st disk whose format is Mac OS Extended format and local volume is true
set DestiName to name of Destinashun
end tell
tell application "Finder"
set SOngs1 to the (number of items of disk (AudioNamen))
end tell
set GoName to (quoted form of POSIX path of AudioNamen)
set UGoName to quoted form of AudioNamen
set GetSetReadyGo1 to (do shell script "cd" & space & "/Volumes/" & DestiName)
set GetSetReadyGo2 to (do shell script "mkdir" & space & "CopiedAIF")
set FolderETA to space & quoted form of ("/Volumes/" & DestiName & "/CopiedAIF")
set GetSetReadyGo3 to (do shell script "cd" & space & GoName)
set asterisk to "*"
set Go1 to (do shell script "cp" & space & asterisk & ".aiff" & FolderETA)
tell application "Finder"
set numberOfSongs to SOngs1 as string
display dialog numberOfSongs & " AIF files copied to disk " & DestiName buttons {"OK"} default button 1
end tell
It hangs on the line
set Go1 to (do shell script “cp” & space & asterisk & “.aiff” & FolderETA)
which is to say, it consistently gives the same error “cp: *aiff : No such file or directory”
Yet a command of the same syntax “cp *aiff /Volumes/BigDisk/CopiedAIF” works fine when entered in Terminal.
What could be the problem? Navigating back to the CD before making the copy (scriptline set GetSetReadyGo1 to (do shell script “cd” & space & “/Volumes/” & DestiName) )? Or is it where I’ve got the asterisk?
Silversleeves