Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a bunch of directories, each one contains exactly 1 file named folder.jpg. What I would like to do is to rename all the files cover.jpg, but when I do search on *.jpg and try to rename, it renames the first file to cover.jpg and every other file becomes cover (1).jpg.

Is there a way I can rename the files without tedious folder-by-folder renaming?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

I would do this with PowerShell:

Get-ChildItem "C:\root\path" -Recurse -Filter "folder.jpg" | % {
  Rename-Item $_.FullName "cover.jpg"
}
share|improve this answer
    
Thank you Sir, that was exactly what I wanted to do. –  kyooryu Oct 28 '12 at 12:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.