Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Renaming files
Name: felix dabid Date: November 26, 2003 at 01:49:10 Pacific OS: NT4 CPU/Ram: PIII1Ghz
Comment:
I want to rename a file called barp_1234.txt to bar_1234.txt. I have files like this...
barp_0001.txt barp_0002.txt and so on.
I've tried rename barp_* bar_* but that results in this filename bar__0001.txt.
Is there any way I can rename the file and remove one character from the new filename.
Understand what I'm talking about, or am I just confused? ;)
Summary: If you have to rename files as those you posted, .0 extension and fixed format filename, it is more practical you try the following: @Echo Off For /F "tokens=*" %%I in ('Dir /B %~f1.\*.0') Do Call :RE...
Summary: Easiest approach: Requires the ability to use the DOS extensions (NT4 SP3 or SP4 onwards I think???) rem Rename File @echo off rem Enable Extensions verify other 2>nul setlocal enableextensions if er...
Summary: I have tried lots of ways to rename files by using a batch file but I can not add prefixes to the my old file names by using wild cards. Is there a way to rename with wild cards as the samples below. ...