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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FTP script for Windows [yeah, i know this is a UNIX forum :) ]

Status
Not open for further replies.
Apr 17, 2006
27
0
0
US
Hi,

I need to connect to a ftp server everyday, and get files that have the day's date in their filename:

for eg. xyz-20070716.xml

I have a UNIX script that does it easily as:

date=`date +%m-%d-%Y`
/usr/bin/ncftpget ftp://${user[$i]}:${pass[$i]}@${ftpserver}/*.${date}*

Does anyone know how to translate this into a Windows batch script? I know how to build the basic windows script for this, mget etc. but how do I fit the 'date' bit in?

I can't use Perl or Cygwin, etc.

Any pointers will be appreciated!

Thanks.
 
Use VBScript.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top