Another renaming question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I sometimes have the need to rename groups files that have extraneous
characters that I want to get rid of. For example I might have 50 files of
the form similar to: filename1_someuselesschars.txt,
anotherfile2_someuselesschars.txt, uniquename3_someuselesschars.txt...What I
want is to rename them such that I end up with: filename1.txt,
anotherfile2.txt & uniquename3.txt. I used to know how to do this with 4DOS
batch files using variable functions. Is there a way to do this using the
commands available in Windows 2000 .bat or .cmd files?
 
I sometimes have the need to rename groups files that have extraneous
characters that I want to get rid of. For example I might have 50 files of
the form similar to: filename1_someuselesschars.txt,
anotherfile2_someuselesschars.txt, uniquename3_someuselesschars.txt...What I
want is to rename them such that I end up with: filename1.txt,
anotherfile2.txt & uniquename3.txt. I used to know how to do this with 4DOS
batch files using variable functions. Is there a way to do this using the
commands available in Windows 2000 .bat or .cmd files?

set var=%var:~0,9%

set /?
shows more manipulations.
 
Back
Top