Solved

Append file extension

Posted on 2011-02-23
4
611 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:M3rc74
Comment Utility
0
 
LVL 13

Accepted Solution

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

Expert Comment

by:ajaykerala
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

VALIDATING DATES One method of validating dates is to jam the date into the DATE command and see if it accepts it by examining the system's errorlevel value. A non-zero result indicates failure. A typical example might look something like the fol…
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…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now