Re: Scripting Terminal for simple FTP
Re: Scripting Terminal for simple FTP
- Subject: Re: Scripting Terminal for simple FTP
- From: Reinhold Penner <email@hidden>
- Date: Thu, 3 Apr 2003 10:26:07 -1000
On Thursday, Apr 3, 2003, at 09:27 Pacific/Honolulu, Andrew Oliver
wrote:
I want the script to automatically decide which file to download,
although
I'll accept, at a pinch, displaying a list of filexx.txt files for the
user
to choose from (although, if you can get that listing the logic to
choose
the file is simple).
Well, if you don't insist on using the Terminal, it would be as simple
as using curl with the -I flag:
set theURL to "
ftp://ftp.machine.domain/myFolder"
set theResult to do shell script "curl -I '" & theURL & "'"
From there you can parse the modification date of theResult and
download whatever you like. I use that same procedure in an application
that automatically downloads the latest version of Camino. You can even
traverse folders to find the latest version.
-Reinhold
_______________________________________________
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.