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.
increment filename
Name: mondial Date: May 8, 2007 at 12:56:01 Pacific OS: windows 95 CPU/Ram: 20 mb Product: ibm thinkpad
Comment:
Hi. Would like to know how to increment a filename. ie. file.txt to file01.txt, file02.txt, file03.txt etc. It's the same file with different names. Thanks.
Name: Mechanix2Go Date: May 8, 2007 at 13:56:02 Pacific
Reply:
Do you want to make copies or rename or what?
===================================== If at first you don't succeed, you're about average.
M2
0
Response Number 2
Name: mondial Date: May 9, 2007 at 07:34:17 Pacific
Reply:
I suppose rename will destroy, but I need to keep all copies, so copy it is. Thanks.
0
Response Number 3
Name: Mechanix2Go Date: May 9, 2007 at 23:44:50 Pacific
Reply:
for %%N in (01 02 03) do copy file.txt file%%N.txt
===================================== If at first you don't succeed, you're about average.
M2
0
Response Number 4
Name: mondial Date: May 10, 2007 at 09:19:49 Pacific
Reply:
Thanks, looks easy now. Is this the only way even if you need to make ~70 copies?
0
Response Number 5
Name: mondial Date: May 10, 2007 at 11:11:06 Pacific
Reply:
I figured it out. /l Thanks.
M
0
Response Number 6
Name: matta Date: May 25, 2007 at 06:35:50 Pacific
Reply:
I would like to incrment the file extension at different times. When the file is created at 1:30 as <filename>.txt it could be renamed as <filename>.001. Then, when the file is created at 2:00 as <filename>.txt again it could be renamed as <filename>.002, etc... Any ideas?
0
Response Number 7
Name: Mechanix2Go Date: May 25, 2007 at 13:16:01 Pacific
Reply:
You need a new thread.
===================================== If at first you don't succeed, you're about average.
M2
0
Response Number 8
Name: Fen_Li Date: June 29, 2007 at 14:32:35 Pacific
Reply:
@mondial
70~copies : for /l %%a (1,1,70) do copy "file.txt" "file%%~a.txt"
"still newbie kid"
0
Response Number 9
Name: Mechanix2Go Date: June 30, 2007 at 02:09:06 Pacific
Reply:
There is no for /l in DOS.
===================================== If at first you don't succeed, you're about average.
Summary: Hi I need to reinstall windows after a crash, but in scandisk it finds an invalid long filename and cannot install until this is fixed, however I cannot run the required scandisk for windows as window...
Summary: I have long wondered if it is possible to append a numerical datestamp or timestamp to a filename. If other words if a processed a file called "export.dat" how could I rename it to include today's da...