Santosh Benjamin’s Weblog

February 9, 2008

DOS Batch Rename in XP

Filed under: General — Tags: — santoshbenjamin @ 4:57 pm

Just a little non Biztalk tidbit for my own future reference and maybe useful to someone else :-)

I had a batch of mp3 files i wanted to add a suffix to and was looking for a quick DOS command to do that. I found this article on Yahoo Answers which did the trick and the author did an excellent job of explaining every part of the command.

All I had to write was

for /f “tokens=1-2 delims=.” %i in (‘dir *.mp3 /b’) do ren “%i.%j” “%i(BT).%j” 

and that did the trick basically renaming a file such as “MyFavorite.mp3″ to “MyFavorite(BT).mp3″.

Another page with a nice detailed collection of renaming techniques and commands can be found here at ExpertsExchange.

Enjoy.

1 Comment »

  1. Very handy, thanks! :)

    Comment by Chris — June 24, 2009 @ 9:54 am


RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.