11 November 2007

On File Indexing

So let's say you have a hard drive with files, none of which you particularly care about so you don't take the time/money/effort to back them up. Yet you would like to know what's on the drive in case it ever crashes and you need to re-acquire those files. Do you pony up for file indexing software and deal with its quirks. Spend a weekend writing indexing software that spits out a list or a database file. Or do you rely on handy dandy old school DIR. I being lazy and needing simple file-keep-track-of software just went with dir. Here's the one liner that will spit out all the files of a particular drive that you are in to a text file. Eh its no "ls" but it'll do. Hmm now just setup a bat file to do this periodically, and you've got yourself an indexing system.

dir /b /s /n > filename_2007_11_10.txt

Oh, and in case you wanted to format that drive to Fat32 so it would be compatible with media player appliances. Windows will only format fat32 for 32 GB hard drives now.

Cool app of the week: Fat32 Formatter