Author Options:

How would a code for a batch file go to change multiple files from say .exe to .txt go? Answered

I am trying to write a batch file that renames multipile files with different extentions to the same one e.g. .txt. Would it be possilbe to get the same effects from a .vbs file? And then if I didn't want how would I delete all of them?

Thx in advance


Molten Boron

Best Answer 9 years ago

@echo off
ren *.exe *.txt

The folder you execute this batch file in will have all its exe files turned into txt files.

Prof. Pickle

6 years ago

Well, changing an executable file to a text file wouldn't work... but a batch file to a text file would...

set /p direc=Insert the path to the files you want changed:
cd %direc%
ren *.bat *.txt

Or the other way around:

ren *.txt *.bat

I hope this helps!

El Mano

9 years ago

Sorry, Molten Boron.

@rename "*.exe" "*.txt"


9 years ago


Note that the author of this question was also a participant in that one.