Computing.Net > Forums > Disk Operating System > DOS RENAME/Copy

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.

DOS RENAME/Copy

Reply to Message Icon

Name: moxamillions
Date: November 22, 2004 at 09:52:19 Pacific
OS: Windows 98 SE
CPU/Ram: Pent 4, lots of Ram
Comment:

I am having problems with the following. I am looking to automatically rename .tif files as they are added to a directory. I figure I can run a batch that is executed every minute or so that will rename all the files and copy them to another directory. However after I copy the renamed files out, I want to keep the numbering scheme. How can I accomplish this?

For example
file1
file2
file3
(the above three files are renamed and copied via batch)
then
3 more file are added to the directory
I want them added as
file4
file5
file6

This is what I have thus far (any copy help would also be appreciated)

@Echo Off
:: RXLS.BAT Syntax: RXls K:\HUD1

Echo.
If not exist %~f1.\*.tif (Echo no .tif files found in %~f1 & GoTo :EOF)

Set Count=0
For %%A in (%~f1.\*.tif) Do Call :REN %%A
Set Count=
GoTo :EOF

:REN
Set /A Count=%Count%+1
Ren "%*" %Count%.tif
Echo Ren "%*" %Count%.tif
GoTo :EOF
PAUSE

emmauswalker@yahoo.com



Sponsored Link
Ads by Google

Response Number 1
Name: IVO
Date: November 22, 2004 at 10:08:40 Pacific
Reply:

Your script is an NT-kernel batch. Why do you post as running under Windows 98 SE?

And more why in DOS Forum?

I am a tolerant person, but I begin to believe some guys insofferent for that kind of posts are true.


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: DOS RENAME/Copy

how do i copy in dos www.computing.net/answers/dos/how-do-i-copy-in-dos/12386.html

how do you copy a:\ to C:\ in dos 6.22 www.computing.net/answers/dos/how-do-you-copy-a-to-c-in-dos-622/7709.html

How do I copy CD To HD www.computing.net/answers/dos/how-do-i-copy-cd-to-hd/15330.html