1/24/2009

01-22-09 - endir

One of the most useful things I've done recently is "endir.bat" :
endir.bat :

if not exist "%1" endbat
md zz
call mov %1 zz\
call zren zz %1

It puts an object into a dir with the same name as that object. This sounds silly but it's a super useful starting point for lots of things. For example, you have a bunch of music folders named :

Stupid Band NAme - Ironic Album Title

You want to make that

Stupid Band Name / Ironic Album Title

a dir inside a dir. You just go "endir" on the original single dir, it makes a dir inside a dir. Now to do the rename you just truncate each name where you want it. (it's impossible to write a general renaming rule for this because people use all kinds of different separators; I've literally seen names like "And_You_Will_Know_Us_By_The_Trail_Of_Dead_Source_Tags_And_Codes").

No comments:

old rants