Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 695
  • Last Modified:

Append file extension

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
failed
Asked:
failed
1 Solution
 
Kruno DžoićSystem EngineerCommented:
0
 
Brett DanneyIT ArchitectCommented:
Open DOS, change directory to the folder the files reside in. Type rename *.* *.*.xml
0
 
ajaykeralaCommented:
ren 21345678_ordrsp.xml 21345678_ordrsp*.*000123*.*xml

 how to rename file with 2 dots in cmd
0
 
Steve KnightIT ConsultancyCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now