Your best friend for file transfer.

Renaming files with an Applescript (3 posts)
This is an archived topic. The information in it is likely to be out-of-date and no longer applicable to current versions of Fetch.
- Started 19 years ago by reneo
- Latest reply 19 years ago from reneo
-
reneo Member
-
Jim Matthews Administrator
Instead of using rename I would use "set name":
tell application "Fetch 4.0.3"
set vKijkjeArchief to shortcut "praatje kijkjetest archief" of shortcut window "Fetch Shortcuts"
open vKijkjeArchief
set name of remote item "kijkje_4.html" of transfer window 1 to "kijkje_5.html"
end tellJim Matthews
Fetch Softworks -
reneo Member
Marvelous! Why didn't I came up with this myself?!?
Many thanks Jim!!!
- Page 1
Topic closed
This topic has been closed.
I made an applescript that will rename a few files on a server, it goes like this:
tell application "Fetch 4.0.3"
set vHost to "ftp.praatje.com"
set vPath to "www/kijkjetest/archief/"
set vUser to "x"
set vPassword to "y"
set vKijkje1 to "Users:rene :Desktop:kijkje_1.html"
remove host vHost path vPath & "kijkje_4.html" user vUser password vPassword
rename host vHost path vPath & "kijkje_3.html" user vUser password vPassword newname "kijkje_4.html"
rename host vHost path vPath & "kijkje_2.html" user vUser password vPassword newname "kijkje_3.html"
rename host vHost path vPath & "kijkje_1.html" user vUser password vPassword newname "kijkje_2.html"
copy file vKijkje1 to transfer window 1
end tell
But I do not like to put my password in the script, so that's why I'm trying to use an existing shortcut:
tell application "Fetch 4.0.3"
set vKijkjeArchief to shortcut "praatje kijkjetest archief" of shortcut window "Fetch Shortcuts"
open vKijkjeArchief
rename remote item "kijkje_4.html" of transfer window 1 newname "kijkje_5.html"
end tell
But I keep getting error that a parameter is missing for rename... hmm, what am I missing out on this one?
[This message has been edited by reneo (edited 08-24-2004).]
[This message has been edited by reneo (edited 08-24-2004).]
[This message has been edited by reneo (edited 08-24-2004).]
Posted 19 years ago #