DOS Command – Bulk Change File Extension

There is a one-line DOS command to get all files with a specific extension and change it to a different extension. In my case, I had a bunch of p12 files that I wanted to be pfx so they’d open magically without creating a new association.

for %f in (*.p12) do ren "%f" "%~nf.pfx"

Leave a Reply

Your email address will not be published. Required fields are marked *