URL Access Scripting
URL Access Scripting
- Subject: URL Access Scripting
- From: garybi <email@hidden>
- Date: Fri, 28 Feb 2003 16:48:51 +0000
Hi,
l've got a little problem trying to get muliple files download using URL
Access Scripting.
(please note l've changed the severName and Path name of the example) ;-)
At the moment l've got the following in my script:
set serverName to "
ftp://username:email@hidden" as string
set serverPath to "/downloads" as string
set downloadPath to "MY MAC NAME:Desktop Folder:text files:" as string
set fileRef to {{"testfile1.txt"}, {"testfile2.txt"}, {"testfile3.txt"}}
set dlc to the count of items in fileRef
repeat with n from 1 to dlc
set filename to (item n of fileRef) as string
set ftpfileName to (serverName) & (serverPath) & "/" & (filename)
set finderfileName to (downloadPath) & (filename)
try
tell application "URL Access Scripting" to download
(ftpfileName) to file (finderfileName) replacing yes
on error errorMsg
display dialog "Error: " & (errorMsg)
end try
end repeat
OK - the script does work fine, but it's slow l guess that's because
it's login into the ftp server each time it downloads each file.
l know you can download a folder with URL Access but l only need a few
files each time and do not want to download everything in the dir and
also the biggie is that l do not want to use an ftp client like fetch
because l'd like to run the script without using any 3rd party software.
l've been trying to use wild cards like you can on the command line ftp
but l can not get this to work.. ;-(
Can anyone help?
Regards, Gary.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.