Question : DOS FTP Script passing of parameter

I have these 2 text files to do download of daily files

download.ftp

userid
password
binary
get %SenderId%APRF filename
quit


Download.bat

::DOWNLOAD
FTP -s:download.ftp xxx.xxx.xxx.xxx

::EXIT
exit

It works like a charm but I want to schedule the job and use the current date and time as the file name (e.g. yyyymmdd_hhmm)

How can I do this?

Please advise.

Errol

Answer : DOS FTP Script passing of parameter

Here's a modified version. Uses variables (remember to include your details after the 3 '=' signs). Please let us know if the date format differs on your computer.

@echo off
set userid=
set password=
set ipaddress=
set filename=%date:~6,4%%date:~3,2%%date:~0,2%_%time:~0,2%%time:~3,2%
set filename=%filename: =0%

 >download.ftp echo %userid%
>>download.ftp echo %password%
>>download.ftp echo binary
>>download.ftp echo get %SenderId%APRF %filename%
>>download.ftp echo quit
ftp -s:download.ftp %ipaddress%
Random Solutions  
 
programming4us programming4us