I'm having a problem passing a value from a command script to an ftp
I need to be able to generate the filename to ftp dynamically within
the dos command file (preferable option), or at least be able to pass
it at the command line when the command file is run (backup option).
The filename displays in the dos section, but reverts to %1 or the
variable in the ftp script.
Here are samples:
: filename is yyyymmdd.csv:
for /f "tokens=2,3,4 delims=/ " %%a in ('date /t') do set
set fileName=%thisDate% & ".csv"
ftp -s:upload.ftp ftpServer
and the FTP file (upload.ftp):
If I hardcode the filename in the ftp script, all's well. If I
eliminate the file extension, I can copy a file to a known name, like
uploadFile.csv, then use that known name in the FTP script. But I need
to be able to ftp a file whose name will change every day (the
filename is the current date in the format yyyymmdd.csv).
Any help getting the filename string to concatenate %thisDate% &
".csv" and being able to pass that generated name to an FTP script
will be greatly appreciated.