I want to show the date only (without having to input a date separately) then save the output into a text file. Then I want to change the date. Then I want to take whatever is in the text file and pipe it into the date command. Finally, I want to delete the text file. So far I have this:
@echo off date /t >> date.txt date 09-02-2007 type date.txt | date del date.txt exit
However, I have this problem... using the date command along with the /t switch, the output format is like this: Mon 09/03/2007. When I want to pipe the contents of the text file into the date command, the format required is like this: 09/03/2007 (no day of the week). Is there a way to take out the day from the output of the date /t command?
Or... does anyone have any other ideas to help me out with this batch file?
Many thanks beforehand!