1

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?

3
  • Keep a backup before trying any of the suggestions if the files are anything of value. Jun 5, 2012 at 13:49
  • I want to search inside the files.
    – user101579
    Jun 5, 2012 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?" Jun 5, 2012 at 20:50

3 Answers 3

5

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.

1
  • 2
    The latter might be better of you have several files with the same basename "foo.c foo.h" Jun 5, 2012 at 14:03
1

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.

1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .