IIS FTP Server - ftp scripting help

This is Interesting: Free IT Magazines  
Home > Archive > IIS FTP Server > October 2004 > ftp scripting help





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author ftp scripting help
Daryl Kanary

2004-10-15, 9:26 pm

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.

does anyone have a sample script to do this?
Jeff Cochran

2004-10-15, 9:26 pm

On 11 Oct 2004 11:04:30 -0700, sparty_1984@hotmail.com (Daryl Kanary)
wrote:

>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.
>
>does anyone have a sample script to do this?


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

Jeff
Daryl Kanary

2004-10-15, 9:26 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?




"Jeff Cochran" <jeff.nospam@zina.com> wrote in message
news:416bf41c.354359321@msnews.microsoft.com...
> On 11 Oct 2004 11:04:30 -0700, sparty_1984@hotmail.com (Daryl Kanary)
> wrote:
>
>
> The command line FTP uses a /s to run a script of the FTP commands.
> Launch that from a BAT file.
>
> Jeff



Alun Jones [MSFT]

2004-10-15, 9:26 pm

"Daryl Kanary" <sparty_1984@hotmail.com> wrote in message
news:UxQad.16749$Qv5.10303@newssvr33.news.prodigy.com...
> 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?


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.
~~~~


Daryl Kanary

2004-10-15, 9:26 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)...



"Alun Jones [MSFT]" <alunj@online.microsoft.com> wrote in message
news:eQpgDvHsEHA.3396@tk2msftngp13.phx.gbl...
> "Daryl Kanary" <sparty_1984@hotmail.com> wrote in message
> news:UxQad.16749$Qv5.10303@newssvr33.news.prodigy.com...
I[vbcol=seagreen]
> names
local[vbcol=seagreen]
my[vbcol=seagreen]
>
> 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]

2004-10-15, 9:26 pm

Open up Windows Help (either the Windows-key and F1, or Start -> Help and
Support) and do a search for "ftp subcommands".

Alun.
~~~~

"Daryl Kanary" <sparty_1984@hotmail.com> wrote in message
news:6EUad.7531$5b1.2173@newssvr17.news.prodigy.com...
> I haven't been able to find any documentation to tell me that....
> (apparently I haven't been looking in the right place)...



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com