I am calling the following from a .cmd file:
ftp -d -s:D:\backup\web-daily.txt
The web-daily.txt file is an ftp input file with similar contents to this:
open <server>
<login>
<password>
put d:\backup\web-daily.7z web-daily.7z
quit
I need to be able to pass the current date to the ftp input file. Is this doable without having to execute a program that actually modifies web-daily.txt? This is because web-daily.7z is actually web-daily_%date:~10,4%%date:~4,2%%date:~7,2%.7z (or web-daily_yyyy_MM_dd.7z).
I'd like to pass this date in as a parameter if possible.
Here's how to effectively pass a date parameter to an FTP input file on windows.
This will send web-daily_yyyy_mm_dd.7z to the ftp server.
I agree, this will do it, in North American format. There may be a way to make it universal, but that may not be important if the server won't change.