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

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

@echo off
ren *.exe *.txt

The folder you execute this batch file in will have all its exe files turned into txt files.
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 Mano7 years ago
Sorry, Molten Boron.

@rename "*.exe" "*.txt"
seandogue8 years ago

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