CorribView
CorribView

Reputation: 741

Recursively renaming extension of all files with a given extension

I need a way to remove an extension from all files that have have .failed extension added. The folder structure has sub trees e.g.:

c:\Folders\Level1\Level2\fileName1.xml.failed c:\Folders\Level1\Level2\fileName2.xml

Would result in the folder Level2 containing: fileName1.xml and fileName2.xml.

There are hundreds of sub folders that have the .failed extension.

Any ideas?

Upvotes: 0

Views: 218

Answers (1)

prashant thakre
prashant thakre

Reputation: 5147

Try below code if you using shell

for /R %x in (*.failed) do ren "%x" *.

Upvotes: 1

Related Questions