Windows 7 sequentially numbered file extensions

M51

Joined
May 15, 2014
Messages
1
Reaction score
0
I have a program that I cannot edit that produces files with sequentially numbered file extensions *.o### (ie, *.o641, *o.642, etc.). These files are just text files that I would like to open with Notepad++, however Windows does not recognize them and so I have to go through the entire, "Select a program..." nonsense for every single new run of the program.

I tried using the windows command prompt "assoc.o641=.txt", but this only works for a single file and thus is just as cumbersome as the "select a program" routine. assoc .o***-.txt does not work, assoc .o*=.txt does not work, and I can't figure out how to get a FOR loop to do it for all numbers 000-999.

Does anyone know of a way to fix this so that any file with the extension *.o### opens automatically in Notepad++?

Thanks
 

Ian

Administrator
Joined
Feb 23, 2002
Messages
19,873
Reaction score
1,499
If you're familiar with the command prompt, then you could try:

Code:
ren *.o* *.*.txt

That should rename all files of the type *.o123, *.o234, etc... to end in .txt, so you can open them in Notepad++

Just a caveat... please only run that command if it makes sense and you are familiar with the command prompt, as it will bulk change filenames in that directory.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top