Computing.Net > Forums > Windows XP > Batch rename files

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.

Batch rename files

Reply to Message Icon

Name: okibi
Date: April 30, 2007 at 06:54:57 Pacific
OS: Windows XP
CPU/Ram: Intel / 1GB
Product: Dell
Comment:

Hello!

I have a bunch of files in a folder called 001_FILENAME.HTML where 001_ is always 001_ and FILENAME can be anything. I want a batch script to rename all the files to remove the 001_ and leave the rest. Can someone please help me?

Thanks!



Sponsored Link
Ads by Google

Response Number 1
Name: IVO
Date: April 30, 2007 at 11:36:36 Pacific
Reply:

Save the following batch in your folder and run

@Echo Off

For /F "tokens=1,* delims=_" %%A in ('Dir /B 001_*.html') Do (Ren %%A_%%B %%B)

where the For /F...%%B) fits just one line without CR/LF.


0

Response Number 2
Name: okibi
Date: May 1, 2007 at 07:01:00 Pacific
Reply:

Thanks, worked perfectly!


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


User Account vbskpro2.ocx problem



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Windows XP Forum Home


Sponsored links

Ads by Google


Results for: Batch rename files

Batch Rename Files www.computing.net/answers/windows-xp/batch-rename-files-/109651.html

Batch file to copy and rename files www.computing.net/answers/windows-xp/batch-file-to-copy-and-rename-files/178066.html

Batch rename for XP www.computing.net/answers/windows-xp/batch-rename-for-xp/50114.html