Solved

Append file extension

Posted on 2011-02-23
4
635 Views
Last Modified: 2012-06-27
Hi,

I need to append a .xml extension to all the files in a folder.
I tried using "ren" but that just changes the file extension.

The files in the folder are all of the format 21345678_ordrsp.000123
Using ren would change that to 21345678_ordrsp.xml, whereas I want 21345678_ordrsp.000123.xml
0
Comment
Question by:failed
4 Comments
 
LVL 11

Expert Comment

by:Kruno Džoić
ID: 34959465
0
 
LVL 13

Accepted Solution

by:
SagiEDoc earned 500 total points
ID: 34959476
Open DOS, change directory to the folder the files reside in. Type rename *.* *.*.xml
0
 
LVL 4

Expert Comment

by:ajaykerala
ID: 34959514
ren 21345678_ordrsp.xml 21345678_ordrsp*.*000123*.*xml

 how to rename file with 2 dots in cmd
0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 34959739
If you use

rename *.* *.*.xml  then it will rename xxx.txt to xxx.txt.xml  which is OK if that is what you want.

rename *.* *.xml will replace the extension with .xml

steve
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

YESTERDAY YESTERDAY.BAT is inspired by a previous article I wrote entitled: TOMORROW.BAT (http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/MS_DOS/A_4196-Advanced-Batch-File-Programming-TOMORROW-BAT.html). The crux of this batch f…
Being a system administrator some time we require to do things remotely, one of them is installing software. Here I am going to tell you how to install software through wmic (Windows management instrument console). I am not at all saying that this i…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question