Another renaming question

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?
 
F

foxidrive

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top