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.

Can I change all files in my folder (extensions like .log01012010, .log02012010) to .txt? So I can search through all the files with the built-in Windows 7 file searcher?

share|improve this question
    
Keep a backup before trying any of the suggestions if the files are anything of value. –  Daniel Andersson Jun 5 '12 at 13:49
    
I want to search inside the files. –  user101579 Jun 5 '12 at 14:05
    
You have asked a XY question I have answered your real question (X) for you but you I recommend editing your original question to something like "How do I search for text in files that do not end in .txt?" –  Scott Chamberlain Jun 5 '12 at 20:50

3 Answers 3

If you want absolutely every file within a given folder changed to a txt extension, you can open a command window in that folder and type ren *.* *.txt and it will change them all to .txt files, overwriting their original extensions. If you need to maintain the extensions (like if several have the same filename but different extensions) you can enter the command as ren *.* *.*.txt which will append the .txt extension to the end of the current extension.

share|improve this answer
2  
The latter might be better of you have several files with the same basename "foo.c foo.h" –  RedGrittyBrick Jun 5 '12 at 14:03

Those log files appear to have a date stamp in them. If you change them to a txt extension, you will loose that date stamp. Also, if whatever creates the log file has the same file name, the date stamp may be the only distinguishing feature. This could possibly overwrite some of the files if they are named identically.

If all you are trying to do is search, the Windows 7 search feature will find partial words. So if you want to find just the "log" files, simply navigate to that folder and enter *.log in the search box. It will return anything with log in the extension.

share|improve this answer

A much better solution is just use a tool that can search for text inside of files other than txt. I use Agent Ransack. It is free for both personal and commercial use and works great.

share|improve this answer

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.