Solved

Append file extension

Posted on 2011-02-23
4
648 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

TOMORROW TOMORROW.BAT is inspired by a question I get asked over and over again; that is, "How can I use batch file commands to obtain tomorrow's date?" The crux of this batch file revolves around the XCOPY command - a technique I discovered w…
Introduction: Recently, I got a requirement to zip all files individually with batch file script in Windows OS. I don't know much about scripting, but I searched Google and found a lot of examples and websites to complete my task. Finally, I was ab…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
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…

821 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