Your best friend for file transfer.Fetch
Alias Upload: script vs. manual (3 posts)
- Started 11 years ago by mfwills
- Latest reply 11 years ago from mfwills
I have a folder which contains real HTML text files and aliased JPG files. In AppleScript, I do this
tell application "Fetch"
open remote item "ftp://password:domain.com/www/htdocs/"
put into transfer window "domain.com" item alias "HD:Desktop Folder:snafu:"
THe HTML docs get transferred fine; the aliased JPGs show up on the server, but with zero content. Apprently Fetch uploads the alias itself, not the original.
If I manually drag an alias onto Fetch, the original file gets uploaded.
Why the difference? Is there something in Fetch that differentiates, or is it caused by using a script? What might I do to either Fetch prefs or the script to fix it?
Jim Matthews Administrator
It isn't caused by using a script, it is a distinction between transfering individual files and transfering a folder. Fetch will resolve an alias if you ask it to transfer one item, but not if you ask it to transfer the contents of a folder (the reasoning was that an alias could point to another folder that is a parent of the one being transfered, causing an infinite loop).
You could write a more elaborate AppleScript that asked Fetch to transfer the files one by one, or you could keep the actual files in the folder you want to transfer; I can't think of any other work-arounds.
I had been using the alias to safeguard the original JPG against accidental disposal, but now that I think of it, I don't see any reason why I can't just copy the JPG to the folder instead of aliasing it.
- Page 1
This topic has been closed.