Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

find file size on FTP from command line ?

Status
Not open for further replies.

MoshiachNow

IS-IT--Management
Feb 6, 2002
1,851
IL
HI,

I was using wget so far to download files from FTP.
What is the way to get the file size on FTP prior to downloading it,from command line?
does not look like WGET has this option.

Long live king Moshiach !
 
OK, so the FTP command can be started from a batch file.
The -s parameter allow for a list of ftp commands to be contained in the file named.

Example - if the batch file contains:

%windir%\system32\ftp -s ftpstuff.txt ftp.host.com ? ftp.log

then ftpstuff.txt can contain the commands you want to execute once connected to ftp.host.com, such as:

username
password
cd directory
dir
quit

Then ftp.log will contain the log of the session, which can be scanned for whatevery it is you are looking for.

Jock
 
thanks,

that's how I normally do it.
Thought there maybe some utility that excepts all as parameters in command len.

Long live king Moshiach !
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top