Computing.Net > Forums > Disk Operating System > Rename a file to file with a secuential number?

Rename a file to file with a secuential number?

Reply to Message Icon

Original Message
Name: Cepade
Date: November 21, 2000 at 08:48:45 Pacific
Subject: Rename a file to file with a secuential number?
Comment:

How can I rename a file to a file with a secuential number? Always taking the last number + 1 of course.
For example last file in a directory is: c:\COPY\file.019
After executing the batchfile the next file would be named file.020, etc.

I hope you can help me. Many Thanks.


Report Offensive Message For Removal


Response Number 1
Name: big shot
Date: November 21, 2000 at 12:57:30 Pacific
Subject: Rename a file to file with a secuential number?
Reply: (edit)

??????????????????????????


Report Offensive Follow Up For Removal

Response Number 2
Name: Topz
Date: November 21, 2000 at 13:59:40 Pacific
Subject: Rename a file to file with a secuential number?
Reply: (edit)

I think that it can not be done with just a batch file (plaese tell me that Im wrong coz this is a sweet little thing if anyone can do it), So I would say write it in quickbasic (then make EXE) or any other programming tool (I only know basic (VB & a bit of DOSBasic)
I will keep an eye on this ;-)
topz


Report Offensive Follow Up For Removal

Response Number 3
Name: World Library
Date: November 21, 2000 at 15:24:47 Pacific
Subject: Rename a file to file with a secuential number?
Reply: (edit)

It can be done in batch but the typing is unbelievable.......if you must I will look it up and post the information. Not the bat as I hate typing.

May I suggest a super "windose" program.
I think you will like it as it is more flexable than a batch file.

Web site : http://www.gene6.com


Report Offensive Follow Up For Removal

Response Number 4
Name: P.A.Caleala
Date: November 21, 2000 at 17:01:54 Pacific
Subject: Rename a file to file with a secuential number?
Reply: (edit)

Search ZDNet for a program called Batchman


Report Offensive Follow Up For Removal

Response Number 5
Name: cepade
Date: November 22, 2000 at 03:15:45 Pacific
Subject: Rename a file to file with a secuential number?
Reply: (edit)

How about something like (it seems to work only under NT:

set a=100
for %%b in (%pfad%\save\gen\seperate.*) do set /a a="a+1"
copy %pfad%\in\seperate %pfad%\save\gen\seperate.%a% && del %pfad%
in\seperate


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: Rename a file to file with a secuential number?

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




How often do you use Computing.Net?

Every Day
Once a Week
Once a Month
This Is My First Time!


View Results

Poll Finishes In 4 Days.
Discuss in The Lounge