Using REN to append characters to a batch of filenames?

  • Thread starter Thread starter BillW50
  • Start date Start date
B

BillW50

Hi all... changing the file type (extension) with using REN is easy
stuff. So no problems there. But when I try to change say a file named
like 1.txt, 2.txt, etc. to something like home1.txt, home2.txt, etc. I
can't figure out the correct syntax to use with the wildcards. Can this
be done from REN with multiple files? TIA

______________________________________________
Bill (using a Toshiba 2595XDVD & Windows 2000)
-- written and edited within Word 2000
 
BillW50 said:
Hi all... changing the file type (extension) with using REN is easy
stuff. So no problems there. But when I try to change say a file named
like 1.txt, 2.txt, etc. to something like home1.txt, home2.txt, etc. I
can't figure out the correct syntax to use with the wildcards. Can this
be done from REN with multiple files? TIA

______________________________________________
Bill (using a Toshiba 2595XDVD & Windows 2000)
-- written and edited within Word 2000

You'll have to do it in a batch file:

@echo off
dir *.txt /b > list.dat
for /F "tokens=*" %%* in (list.dat) do echo ren "%%~n*.txt" "Home %%~n*.txt"
del list.dat

Remove the word "echo" to activate the batch file.
 
Back
Top