Ftp subdirectories list

A

Aliyah

Hi,

In FTP, Is it possible to list all files including
subdirectories in client ftp site (with permission from
client), just like "dir /s" in dos command? Is there a ftp
command,utility or batchfile you would recommend to
achieve this.

thanks in advance,

AMD
 
T

Torgeir Bakken (MVP)

Aliyah said:
In FTP, Is it possible to list all files including
subdirectories in client ftp site (with permission from
client), just like "dir /s" in dos command? Is there a ftp
command,utility or batchfile you would recommend to
achieve this.

Hi

You can redirect the output from ftp.exe to a file:

ftp.exe -i -s:ftp.inp ftpserv1.bogus.com >dirlist.txr


where ftp.inp is a file something like this:

anonymous
(e-mail address removed)
cd SomeFolder/SomeAnotherFolder
ls -l
bye
 
T

Torgeir Bakken (MVP)

Aliyah said:
In FTP, Is it possible to list all files including
subdirectories in client ftp site (with permission from
client), just like "dir /s" in dos command? Is there a ftp
command,utility or batchfile you would recommend to
achieve this.

Hi

Take 2, this time with subdirs ;-)


ftp.exe -i -s:ftp.inp ftpserv1.bogus.com


where ftp.inp is a file something like this (file list output to file
f:\ftpdirlist.txt):

anonymous
(e-mail address removed)
cd SomeFolder/SomeAnotherFolder
mls *
f:\ftpdirlist.txt
y
bye
 
A

Aliyah

-----Original Message-----


Hi

Take 2, this time with subdirs ;-)


ftp.exe -i -s:ftp.inp ftpserv1.bogus.com


where ftp.inp is a file something like this (file list output to file
f:\ftpdirlist.txt):

anonymous
(e-mail address removed)
cd SomeFolder/SomeAnotherFolder
mls *
f:\ftpdirlist.txt
y
bye



--
torgeir
Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of the 1328 page
Scripting Guide: http://www.microsoft.com/technet/scriptcenter


wow, that was fast. Thank you very much torgeir.

I know i've ask to much of you and I appreciate it. I need
also the date and time stamp of each file.

thanks again.

ADM
 
J

Jorge Cunha

-----Original Message-----
Hi,

In FTP, Is it possible to list all files including
subdirectories in client ftp site (with permission from
client), just like "dir /s" in dos command? Is there a ftp
command,utility or batchfile you would recommend to
achieve this.

thanks in advance,

AMD
.


Hi there ,

In CMD prompt you could with several command's like "ls"
(list files) , "cd" change subdirectory ,"lcd" change
local directory,"pwd" ( which directory are you
in ) , "mget" ( multiple file copy from host ),"get"
single file copy form host ftp,etc.
For example:

ftp www.ftp.net user:user3 password
lcd temp
cd temp
mget file*.*
close
bye
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top