Hye everyone..Such a nice forum..I am very new to using MS-DOS as a scripting language so please forgive my (hopefully) easy question. What I am trying to do is to create a batch file command to find all the file with .XML extension and rename it to .tmp extension. After this create a second batch file to rename from .tmp back to .xml extension. Can anyone help me on this matter.
Thank you so much.
Rename file extension with another file extension
Moderator: DosItHelp
-
- Posts: 1
- Joined: 28 Mar 2011 20:07
Re: Rename file extension with another file extension
Welcome to the forum!
To rename all .XML files to .tmp, simply use wildcards:
And to rename the .tmp files back to .XML, just do the reverse
Please note that this will only rename files in the folder path in %CD%
Hope this helps!!
phillid
To rename all .XML files to .tmp, simply use wildcards:
Code: Select all
@echo off
ren *.XML *.tmp
And to rename the .tmp files back to .XML, just do the reverse
Code: Select all
@echo off
ren *.tmp *.XML
Please note that this will only rename files in the folder path in %CD%
Hope this helps!!
phillid