# how do i make a .bat file to rename another file?



## linkinworm (Dec 10, 2007)

hi, i have this file structure

cd C:/packer/000100014e414350

i have some files i want it to rename here is the list
000100014e414550.cert
000100014e414550.tmd
000100014e414550.tik
000100014e414550.trailer

i want to rename them to trailer.cert ect

whats the line to get it to rename of these files?


----------



## Squashman (Apr 4, 2003)

```
C:\test>dir
 Volume in drive C has no label.
 Volume Serial Number is D4DE-5B6B

 Directory of C:\test

04/30/2008  12:17 PM    <DIR>          .
04/30/2008  12:17 PM    <DIR>          ..
04/30/2008  12:15 PM                 0 000100014e414550.cert
04/30/2008  12:16 PM                 0 000100014e414550.tik
04/30/2008  12:16 PM                 0 000100014e414550.tmd
04/30/2008  12:17 PM                 0 000100014e414550.trailer
               4 File(s)              0 bytes
               2 Dir(s)  94,611,685,376 bytes free

C:\test>rename 000100014e414550.* trailer.*

C:\test>dir
 Volume in drive C has no label.
 Volume Serial Number is D4DE-5B6B

 Directory of C:\test

04/30/2008  12:18 PM    <DIR>          .
04/30/2008  12:18 PM    <DIR>          ..
04/30/2008  12:15 PM                 0 trailer.cert
04/30/2008  12:16 PM                 0 trailer.tik
04/30/2008  12:16 PM                 0 trailer.tmd
04/30/2008  12:17 PM                 0 trailer.trailer
               4 File(s)              0 bytes
               2 Dir(s)  94,611,685,376 bytes free

C:\test>
```


----------



## NICK G (Sep 11, 2006)

start/run/cmd
cd\
edit change.bat (whatever name you wish)(type the following in)
cd C:/packer/000100014e414350 (or whatever directory these files are in)
ren 000100014e414550.cert trailer.cert 
Go to file/exit/save
Just rename all the files you wish in the above manner.
You can run this from dos box or windows but will not see the changes taking place
in windows. It will just do it.
Good luck.


----------



## linkinworm (Dec 10, 2007)

thanks this will speed things up a little. for me


----------



## Elvandil (Aug 1, 2003)

Publicware File Renamer (409KB)
Lupas Rename (742KB) 
Flexible Renamer (648KB)
Rename Master (~500KB)

If any of these have CL options, they may have more options than a batch file.


----------



## werwick (Apr 30, 2008)

Hi sorry I connot help you because I don't have any idea about your question

Good luck!


----------

