Groups | Blog | Home
all groups > iis ftp > october 2004 >

iis ftp : ftp scripting help



sparty_1984 NO[at]SPAM hotmail.com
10/11/2004 11:04:30 AM
I need to create a ftp script that will do a directory listing of a
remote folder and create a local file that has that list. I know
manually get the list, but I don't know how to put it into a local
file.

jeff.nospam NO[at]SPAM zina.com
10/11/2004 8:59:38 PM
On 11 Oct 2004 11:04:30 -0700, sparty_1984@hotmail.com (Daryl Kanary)
[quoted text, click to view]

The command line FTP uses a /s to run a script of the FTP commands.
Launch that from a BAT file.

Alun Jones [MSFT]
10/12/2004 9:27:15 AM
[quoted text, click to view]

This is really an issue with the FTP client, rather than with the server,
but I can answer it for you. The "dir" or "ls" commands in the FTP client
take two arguments, both of which are optional. The first argument is
interpreted as the directory or file you want to list, and the second is
interpreted as a file to which you wish to send the output.

So, to list the current directory (whose shorthand name is ".") to the file
"fred.txt", you would use the command "dir . fred.txt".

Alun.
~~~~

Alun Jones [MSFT]
10/12/2004 11:13:24 AM
Open up Windows Help (either the Windows-key and F1, or Start -> Help and
Support) and do a search for "ftp subcommands".

Alun.
~~~~

[quoted text, click to view]

Daryl Kanary
10/12/2004 12:58:28 PM
thanks for the reply, but I think I didn't make my question clear.

I am not having any trouble getting an ftp script to work, my issues is I
need to get a "Directory Listing" from the remote server so I know the names
of the files there and I need to get this listing into a file on the local
machine. manually I would just connect and do a "dir or ls" command. my
question is how do I pipe that to a file on the local machine?




[quoted text, click to view]

Daryl Kanary
10/12/2004 5:38:10 PM
Thank You sir...

I haven't been able to find any documentation to tell me that....
(apparently I haven't been looking in the right place)...



[quoted text, click to view]

AddThis Social Bookmark Button