I want to copy a file from one computer called “Big Disk” to my computer called “Macintosh HD”
This script hangs up when it sees “duplicate”
Is there a better command?
on idle
tell application “Finder” to set t_file to (duplicate “Big Disk:Other:Wordcounts.xls” to “Macintosh HD:Other:Wordcounts.xls” with replacing) as Unicode text
Model: PowerBook G4
AppleScript: 2.1.1
Browser: Safari 419.3
Operating System: Mac OS X (10.5)
the command is fine (although for copying files to a different volume move works also),
but it’s impossible to copy a string to a string, only files or aliases can be copied
tell application "Finder" to set t_file to (duplicate file "Big Disk:Other:Wordcounts.xls" to file "Macintosh HD:Other:Wordcounts.xls" with replacing) as Unicode text
alternatively use the shell
do shell script "cp '/Volumes/Big Disk/Other/Wordcounts.xls' '/Volumes/Macintosh HD/Other/Wordcounts.xls'"
I apologize,
the Finder can only copy a file to a folder
tell application "Finder" to set t_file to (duplicate file "Big Disk:Other:Wordcounts.xls" to folder "Macintosh HD:Other:" with replacing) as Unicode text