Solved

Append file extension

Posted on 2011-02-23
4
669 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

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…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

636 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