simple redirect not working

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
bmurtha
Posts: 4
Joined: 17 Nov 2015 13:47

simple redirect not working

#1 Post by bmurtha » 17 Nov 2015 14:19

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

Squashman
Expert
Posts: 4486
Joined: 23 Dec 2011 13:59

Re: simple redirect not working

#2 Post by Squashman » 17 Nov 2015 14:52

Code: Select all

echo %dateStr% > test.txt

bmurtha
Posts: 4
Joined: 17 Nov 2015 13:47

Re: simple redirect not working

#3 Post by bmurtha » 17 Nov 2015 15:28

Thank you ! :D

Post Reply