Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
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
file6This is what I have thus far (any copy help would also be appreciated)
@Echo Off
:: RXLS.BAT Syntax: RXls K:\HUD1Echo.
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
PAUSEemmauswalker@yahoo.com

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.

![]() |
![]() |
![]() |

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