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.

Before I commit to the 5 minutes it should take to write this I figure I should ask if it isn't already out there as part of something I may not have heard of. I'm looking for a program that takes a file [input_file] and directory as input, and then searches that directory and all sub directories for any files with the same name as input_file. Renames anything it finds and then copies over input_file.

Looking for a windows solution so something .exe or easy to compile preferred.

Is this the right place to ask this? Based on something I just read this will get closed as off topic... uh.. please no?

Ok it you think its off topic... is there a dos shell command to do this? That's gotta be on topic.

share|improve this question
    
The question is on topic. It is a sufficiently specific and reasonably well worded software recommendation question and is within the bounds of the FAQ. –  DragonLord Jul 13 '11 at 22:18

2 Answers 2

up vote 2 down vote accepted

find will help you find the files, and cp -b will rename the file first if it already exists.

find some\dir -name input_file -execdir cp -b path\to\input_file . ;
share|improve this answer
    
find is like, the best program of all time +1 –  Doc Jul 13 '11 at 22:17

There is an excellent tool called the "Bulk Rename Utility which is excellent for this.

http://www.bulkrenameutility.co.uk/Main_Intro.php

share|improve this answer
    
Welcome to Super User! Generally we like answers on the site to be able to stand on their own - Links are great, but if that link ever breaks the answer should have enough information to still be helpful. Please consider editing your answer to include more detail. See the FAQ for more info. –  slm Apr 11 '13 at 13:32

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.