ftp scripting help
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > IIS server support > IIS FTP Server > ftp scripting help




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    ftp scripting help  
Daryl Kanary


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
10-16-04 02:26 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.

does anyone have a sample script to do this?





[ Post a follow-up to this message ]



    Re: ftp scripting help  
Jeff Cochran


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
10-16-04 02:26 AM

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





[ Post a follow-up to this message ]



    Re: ftp scripting help  
Daryl Kanary


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
10-16-04 02:26 AM

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







[ Post a follow-up to this message ]



    Re: ftp scripting help  
Alun Jones [MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
10-16-04 02:26 AM

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







[ Post a follow-up to this message ]



    Re: ftp scripting help  
Daryl Kanary


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
10-16-04 02:26 AM

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







[ Post a follow-up to this message ]



    Re: ftp scripting help  
Alun Jones [MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
10-16-04 02:26 AM

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







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 12:37 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register