What I learned today

Following the lead of Alex and his “What I learned today“ or “WILT“ series, based on the principle, that if I didn’t know it, maybe someone else also didn’t.

Windows Explorer mass file rename.

I’ve been refactoring some code, make new files the hold classes of vehicles. So I have files in my vehicles directory

vehicle_dozer.cpp (and)

vehicle_dozer.h

Now to make a new vehicle I select both files, copy and paste to get

Copy of vehicle_dozer.cpp

Copy of vehicle_dozer.h

Now if I select both and rename (F2) them, one is editable, so I change the file name part to vehicle_loader and I get

vehicle_loader.cpp

vehicle_loader (1).h

Now I remove the (1) and they are done.

So ok I still have to edit both files, but I only need to remove the (1) which means I don’t need to select the text to edit, or do any typing.

I was shocked when I discovered did this, because it’s just plan clever that it preserves the extensions, that it auto numbers the files to avoid conflict, oh and that it even works full stop.