Re: curl to get FTP directory listing?
Re: curl to get FTP directory listing?
- Subject: Re: curl to get FTP directory listing?
- From: "Gary (Lists)" <email@hidden>
- Date: Wed, 19 Apr 2006 14:51:40 -0400
"Eric Geoffroy" wrote:
> I've been using this:
>
> curl -v ftp://ctalk062:email@hidden -I
Eric,
Put all your switches together. This works for me, and returns a
return-delimited string of the directory listing.
-- Broken up for posting purposes
--
set curlScript to "curl -iv ftp://ctalk062:email@hidden"
set theCurledResult to do shell script curlScript
-->
"drwx------ 2 ftp ftp 4096 Apr 15 17:54 backups
drwx------ 2 ftp ftp 4096 Apr 15 06:47 daily_backup
drwx--x--x 3 ftp ftp 4096 Oct 10 2004 domains
drwx------ 3 ftp ftp 4096 Nov 8 2004 imap
drwx------ 2 ftp ftp 4096 May 23 2005 mail
lrwxrwxrwx 1 ftp ftp 42 Oct 10 2004 public_html -> ./real/path"
One could on from there to make a list of the lines:
set ftpLines to paragraphs of theCurledResult
And deal with single lines as desired:
item 1 of ftpLines
--> "drwx------ 2 ftp ftp 4096 Apr 15 17:54 backups"
--
Gary
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden