Your best friend for file transfer.

Copy replacing? (3 posts)
- Started 12 years ago by Gil
- Latest reply 12 years ago from Gil
-
Gil Member
-
Jim Matthews Administrator
Hi Gil,
Fetch does not support a "replacing <yes/no>" option for the AppleScript "copy" command; it always uses its default behavior, which is governed by the "Overwrite files with conflicting names" checkbox in the Download section of Preferences. By default, that box is unchecked, and Fetch will give the downloaded file a new name. You can check it temporarily in AppleScript, e.g.:
set overwrite files to true
copy remote file "RemoteFileName" to beginning of alias "Path:To:TempFilesFolder"
set overwrite files to falseI hope this helps,
Jim Matthews
Fetch Softworks -
Gil Member
Perfect! Thanks, Jim!
--Gil
- Page 1
Recording with AppleScript Editor, dragging a file from a remote file icon in the transfer window to a local Finder window produced:
copy remote file "RemoteFileName" to beginning of alias "Path:To:TempFilesFolder"
It works fine, but I cannot seem to find the 'copy' command in the sdef dictionary.
In particular, does it have anything like a "replacing <yes/no>" feature, or does one test first? The default behavior of 'copy' on finding an existing file appears to be to change the name.
To test for a file's existence, can one ask Fetch to do this or must one use the Finder?
--Gil
Posted 12 years ago #