68Views4Replies

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

4 Replies

user
Molten BoronBest Answer (author)2009-11-05

@echo off
ren *.exe *.txt

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

Select as Best AnswerUndo Best Answer

user
Prof. Pickle (author)2012-12-15

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!

Select as Best AnswerUndo Best Answer

user
El Mano (author)2010-04-08

Sorry, Molten Boron.

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

Select as Best AnswerUndo Best Answer

user
seandogue (author)2009-11-05

https://www.instructables.com/id/3-Ways-to-Create-a-Virus/?comments=all#CEKY5ATG1M2GUO7

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


Select as Best AnswerUndo Best Answer