Please Help renaming files
Posted: 16 Jul 2009 19:32
Hi Everyone
I’m tiring to make batch file to rename oeminfo.ini to oeminfoBAK.ini and if it exist to auto rename oeminfoBAK1.ini and BAK2 and BAK3 and so on..
I would also like to rename oemlogo.bmp to oemlogoBAK.bmp at the same time and the same way.
if exist c:\windows\system32\oeminfoBAK.ini ren c:\windows\system32\oeminfo.ini oeminfoBAK2.ini
if exist c:\windows\system32\oeminfo.ini ren c:\windows\system32\oeminfo.ini oeminfoBAK.ini
if exist c:\windows\system32\oemlogoBAK.bmp ren c:\windows\system32\oemlogo.bmp oemlogoBAK2.bmp
if exist c:\windows\system32\oemlogo.bmp ren c:\windows\system32\oemlogo.bmp oemlogoBAK.bmp
It works only once before errors. I know there is a better way.
Any help would be deeply appreciated.
Thanks in advance.
I’m tiring to make batch file to rename oeminfo.ini to oeminfoBAK.ini and if it exist to auto rename oeminfoBAK1.ini and BAK2 and BAK3 and so on..
I would also like to rename oemlogo.bmp to oemlogoBAK.bmp at the same time and the same way.
if exist c:\windows\system32\oeminfoBAK.ini ren c:\windows\system32\oeminfo.ini oeminfoBAK2.ini
if exist c:\windows\system32\oeminfo.ini ren c:\windows\system32\oeminfo.ini oeminfoBAK.ini
if exist c:\windows\system32\oemlogoBAK.bmp ren c:\windows\system32\oemlogo.bmp oemlogoBAK2.bmp
if exist c:\windows\system32\oemlogo.bmp ren c:\windows\system32\oemlogo.bmp oemlogoBAK.bmp
It works only once before errors. I know there is a better way.
Any help would be deeply appreciated.
Thanks in advance.