![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: May 2005
Posts: 1
Rep Power: 0
![]() |
Generating files MSDOS Batch
I would like to create a batch script that I will put on a scheduled task "XP" (Mon-Fri) to create a simple text file:
the text file's name is today's date the content of the File is a dynamic url derived from the today's date example the filname is mmddyy.strm the content is mms://hostname/mmddyy/ thanks for the help |
|
|
|
|
|
#2 |
|
Programmer
|
Well.. look into the %date% variable. This doesn't give a mmddyy format, but you might be able to modify it. You could use the echo command and output operators (> for truncating or >> for appending) for the file. Example:
echo mms://hostname/%date%/ >> %date%.strm Of course, this would pose the problem of illegal characters in a filename ('/'), so you'd have to find a way to modify the data given from the %date% variable. Good luck. |
|
|
|
|
|
#3 |
|
Professional Programmer
Join Date: Mar 2005
Location: Glasgow, Scotland
Posts: 314
Rep Power: 4
![]() |
Oh, I've just noticed the DATE command will give you the DD/MM/YYYY (maybe MM/DD/YYYY on machines in the US; this one's set up for the UK) format date. It prompts for a new date, but you can do:
C:\> echo. | date to avoid that. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|