Page 1 of 1

simple redirect not working

Posted: 17 Nov 2015 14:19
by bmurtha
I'm just trying to output a filename to a file along with an FTP command. The desired result is this:
cd prod
get ISP_POD_111715_001.txt

This is what I have:

set buildDate=%DATE:~4,10%
set dateStr=ISP_POD_%buildDate:~0,2%%buildDate:~3,2%%buildDate:~8,2%_001.txt
%dateStr% > test.txt

Re: simple redirect not working

Posted: 17 Nov 2015 14:52
by Squashman

Code: Select all

echo %dateStr% > test.txt

Re: simple redirect not working

Posted: 17 Nov 2015 15:28
by bmurtha
Thank you ! :D