id="info"

Question

Locked

Rename

By Wizard-09 ·
Hello all i need a file that will rename a exe file with .old at the end for every exe file on the computer, I had a file below as a test for one file, but need it to rename the file to .exe.old without changing the file name ie. test.exe.old, thanks.

@ECHO OFF


ren "C:\Documents and Settings\tm09042\Desktop\test.txt" "test1.txt"

This conversation is currently closed to new comments.

8 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

Easy enough.. But, why?

by neilb@uk In reply to Rename

I'm intrigued why you might want to do it.

This batch file command will rename all of the exe files on the c: drive.

FOR /F "tokens=*" %%i IN ('DIR /B /A-D /S c:\*.exe') DO ren "%%i" "%%~nxi.old"

Use with care!

:)

Collapse -

Requested

by Wizard-09 In reply to Easy enough.. But, why?

It was requested by a friend, I work with, think it just wants to see how it works then it might mod it for something that he needs it for thanks for the information, will use care :)

Collapse -

When his system won't boot

by oldbaritone In reply to Requested

because he renamed all of the EXE's, he'll know why this was not a good idea.

Collapse -

It may fail before that!

by TobiF In reply to When his system won't boo ...

If he tries to rename all exe-files on the drive he has booted from, then something will go wrong before the procedure has finished.

And by that time it may be too late to put things back without external tools.

Collapse -

'nuff rope...

by oldbaritone In reply to It may fail before that!

(give 'im enuff rope to hang hisself...)

There's nothing like a determined ID10T...

Collapse -

But..

by TobiF In reply to 'nuff rope...

He wanted to do something to his FRIENDs computer.

With such friends, you don't need trojans. :)

Collapse -

Tried Google?

by TobiF In reply to Rename

Try to search for
"recursive rename dos batch"

And you should find a lot

Back to Desktop Forum
8 total posts (Page 1 of 1)  

Hardware Forums