The Mudcat Café TM
Thread #91794   Message #1748159
Posted By: JohnInKansas
26-May-06 - 06:11 PM
Thread Name: Tech: Searchable Disk Directories?
Subject: RE: Tech: Searchable Disk Directories?
Bill D.

I don't read the request as how to search a hard drive, but how to compile an index of a (large) collection of CDs.

On my Windows setup, I use the (DOS) DIR command to write the CD directory to a file on the hard drive. If desired, multiple directories can then be combined into a single document, and Word can search fairly efficiently for text in the document.

In Windows, you'd click Start|Run. In the run box type "Command" (without the quotes) and hit enter. That opens the "familiar DOS window." I find it easiest to navigate to the folder where I want the index file(s) to be, and then assuming your CD drive is E:\, type:

DIR E:\*.*/S>CD001.txt

Hit enter, and the file named CD001.txt appears in the folder where you were when you gave the command, and contains the list of all files on the CD that was in Drive E:\.

If you insert the next CD, and hit F3, it should dump the keyboard buffer so that the command reappears, and you can "arrow over" and replace the 1 with a 2, hit enter and get CD002.txt, etc.

Keep going until you have a file for each of the CDs.

When finished, type "Exit" and hit enter to close the Command (DOS) window.

I recall vaguely that Mac has a command line "list files" method, probably similar to the DOS one, but can't give details.

Basics:
DIR - - lists the files in the current directory.
DIR E:\ - - lists files at E:\, which is assumed to be the CD drive.
The "wild card" *.* - - says list all the files
The /s switch - - says list subfolders
The "redirect" > - - says send the result somewhere instead of displaying it:
The filename CD001.txt - - says where to send it.

Once you have the .txt files, you may want to open them in Word where you can use Edit|Replace and "replace all" to strip off everything except the filenames, or you may prefer to leave dates and filesizes for identification purposes.

In the .txt file for the first CD, Find "^p" and replace with "^tCD001^p" (again, without the quotes) will find each paragraph end marker (^p), insert a tab (^t), the CD name (CD001) and replace the paragraph marker (^p) at the end of each paragraph (assumed here to be a line with a single filename) so that if you decide to put a few hundred CD listings all in one document you'll be able to tell easily which CD contains the file you find when you do a Ctl-F (Find) to locate a file. Repeat for each of the text files, so that each filename that's listed "knows" which CD it belongs to.

Once you've added the CD label to each file in each of the .txt docs (saved back as .doc, preferably) you can past many of them all into one .doc Word file, and if you like, use Table|Sort to put them in alphabetical order by filename. Depending on how much RAM you have, I've found that about 300 pages will sort easily, but that depends somewhat on how good your machinery is.

One of my index documents, listing about 60 CDs and 10 DVDs, runs 1,667 pages, 9,365 KB, but is a little larger than a plain vanilla list because of hyperlinks to each CD and a few other "active indexing" items. Word will find the first instance of any word (filename) searched (Ctl-F) in less than a second.

Note that the "theoretical maximum" Word file size is 32 MB (Windows or Mac), but I've run a few up to around 89 MB without crashing, although it does slow things down a bit. Around 2 MB should be good for 300 pages or more, for this simple a file.

If you'd prefer a more "elegant" solution, there are programs available intended for indexing all your photos, and some of them allow you to add stuff from "removable media" to the indexes they make. I've never felt the need, so I don't know one to recommend; but perhaps someone else has a favorite.

John