Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Writing simple batch file
Name: Annon Date: July 1, 2002 at 11:42:51 Pacific
Comment:
What I want it to do is when a user runs the batch file...
1. Rename the C:\Temp directory to a directory called OldTemp"date created on". 2. Then have it make another directory C:\Temp
How would I code it to add the date into the directory name? Thanks.
Name: Olivier Ragain Date: July 1, 2002 at 13:58:10 Pacific
Reply:
the date
word can be use to get the date but it also ask u for a new one....
otherwise u can't do what u want.... not with batch commands or ms dos commands at least... i can do it in C or Basic and use a batch to call that program....
Olivier
0
Response Number 2
Name: Olivier Ragain Date: July 1, 2002 at 14:55:52 Pacific
Reply:
prompt $d gives u the date it is the only thing i was able to find on a date command... but their is a problem
i wasn't able to save the date... in a file or other...
try it and see what it do but i think u cant get it as a variable....maybe maybe not
0
Response Number 3
Name: Annon Date: July 1, 2002 at 15:08:48 Pacific
Reply:
Hmmm... not looking to good. The reason why I wanted the date in the filename is so I would be able to save a number of directories with different names, since you cannot have duplicate names. Any good way to do that?? Thanks for the help, by the way.
0
Response Number 4
Name: MacFromOK Date: July 2, 2002 at 15:48:44 Pacific
Reply:
Here's a utility I wrote a while back to retrieve the date from DOS. Instructions for batch file use are included.
http://www.trinex.net/users/mac/DOS/setdate.zip
Cheers, Mac
0
Response Number 5
Name: Yokese Date: July 4, 2002 at 06:08:56 Pacific
Summary: Hey all - I am new to DOS and am still learning all the commands. I have looked on google for some tutorials and what not and have found some good information, but nothing beats this website. I am wr...
Summary: Hi Guys, I am trying to write a batch file that will: 1. Read a text document(Ex:loginlog.txt) 2.find the comma place and save all the text before the comma into a variable %computerName% and then...