Can I make 1KB copies of files?

I have many CDs that I would like to copy to my hard drive in a directory tree structure, with the file lenghts of 1kb (or something really low) just for the purposes of searching… is such a thing possible?


Your question makes it totally unclear on what you want to do. Are these data or music CDs?
A CD contains 640 MB of data, more or less. You could maybe copy an index . Even then,
I doubt you could get it down to 1KB – most disks are formatted in blocks of a certain size, and
that size is probably larger than 1KB nowadays. Still, unless you have a number of CDs (and therefore files)
in the 10’s of thousands, the size of the block seems fairly irrelevant in these days of 40 Gig hard drives.

Why would you need to copy anything to your hard drive just to search a CD?

Sorry, I should have been more clear…

I have 50 something or other MP3 CDs… so I want to have a directory called MP3 and then put in it directories called Disc01, Disc02, etc… I want to fill the directories with basically 1KB text files with the filename of the originals…

I hope that makes more sense… :slight_smile:

It still makes not a bit of sense…

While making that many text files would probably be possible, it would eat up a lot of disk space (because each file will probably be almost twice as large as the actual bit of text you put in it). Then again, this is probably the least efficient of all the methods you could choose to organize your collection. It is easier, in most cases, to simply create either one large text file, or one text file for each disc. Windows will search within these text files just as well as it will dig through such a huge file structure as you propose. These are more quickly searchable, and more suited to your purpose. Your computer’s file structure is most definitely not the best place for the kind of index you’re describing.

Hooray, you caught me on a day where I felt like sitting down and writing some code to solve a problem.

Here’s a script which does what you want. It relies on Windows Script Host, which is built into windows starting in Win98, I believe, so if your OS is older than that (or if you’re on a mac or something – now that I look you didn’t say), this won’t help you a lot.

use it like this from your command prompt:

cscript mirror.js -v e:\ c:\stuff\cds\disk1

This will look at e:\ and make a mirror directory structure in c:\stuff\cds\disk1, except that all the files will be 7 bytes long (containing the string “wooba” + CRLF :)) If you leave off the “-v” it won’t output all the filenames that it’s creating.

I put lots of comments in it, so if you’re curious how it works, just open it up in notepad and dig in.

I’m not sure about this 1k scheme, but if you want to build up a simple database of your disks, do the following:
[li]Go to your DOS or Command Prompt. You typically find this in a Win9X or later system by going Start/Program/Accessories/Command [or MS-DOS] Prompt. You’ll get the old and ugly but serviceable “C:>” prompt, or something like it.[/li][li]Insert the first of your CDs. I’ll assume the CD drive letter is “D” for this example.[/li][li]Type the following and press ENTER: dir d:/b/s/on>disk01.txt[/li][li]Repeat for each subsequent disk, increasing the diskxx number each time. This is even easier if you hit F3 instead of retyping the entire line.[/li][li]Leave the ugly world of the command prompt and return to the less ugly but still treacherous world of Windows by typing EXIT or clicking the X in the upper right corner.[/li][li]You now have a collection of numbered text files on your hard drive (probably in the C: root directory, but if not, do a disk search for disk01.txt to find them).[/li][li]Import these text files, which contain simple directory lists of your compact disks, into your favourite word processor, spreadsheet, whatever. Put in pretty headers and page breaks and any other formatting you like to arrange each disk’s contents. You now have one file that you should be able to search quite easily (the “/on” makes it alphabetical, too!) using the word processor’s/spreadsheet’s own search tool, and the size of this one file will be miniscule compared to ghost directories for each CD with 1K files.[/li][li]If you burn more disks later on, just keep adding them as above.[/li][/ul]

Despite my having done exactly what you asked…trucido’s right - it would be a lot easier to make a text file with the listing you want and then just use “find” in a text editor to find what you’re looking for. The most rudimentary way of doing this is

dir /s e:\ > disk1index.txt

That’ll contain a bunch of information you don’t want, however, such as file sizes and dates. The formatting won’t be pretty, but it’ll be functional. The script I wrote could easily be adapted to just make a text index of the specified directory.

I said:

Then again, you could also use the /b option for “dir” like Bryan suggests. :slight_smile:

He may have the better solution, galt, but you still wrote a nice piece of code nonetheless, and put in the effort to help someone out who you didn’t even know. Good job.

My suggestion is to make a simple database. If you have access to Access, it’s quite trivial. Even if you don’t know how to do it, a friend can whip one up in an hour or so.


For what purpose? Is there a reason why creating aliases (shortcuts) wouldn’t work at least as well if not better?

Select All - Rightclick-drag to intended location, choose “Make Alias”; or, on a Mac, Select All, Command-Option-drag to intended location.

Then you’ve got not only the listing of files but the added advantage of being able to double-click the alias and have the original start playing (assuming you have the right CD inserted, of course).

The purpose is so he can quickly say “hmmm, which of these 27 cd’s holds my copy of Milli Vanilli’s ‘Girl You Know It’s True’” by using a find file function.

I did think of one advantage of using my script over just dumping a listing into a text file: you get to browse it as an expandable/collapsible tree view. You could also do this if you dumped it into an XML file and viewed it in IE, but that would obviously take more work than “dir /s /b” (but I could whip up a unix awk script for it in no time :))

Won’t the Find File function work with shortcuts? (It certainly works fine with Mac aliases).

Sure it will, but unlike on the mac, it won’t tell him which disc to insert when he double-clicks it.

Also, I’d generally prefer to answer the question directly, rather than finding the answer out as a side effect to some action which I don’t necessarily want to perform (opening the file). For example, if you want to send a copy of a song to your friend, you’d like to just know which disc it’s on without having to interrupt whatever music you’re listening to right now becuase the only way to find out what disc it’s on is to play the song in question.

take a look at these applications

take a look at these applications

Try Advanced Disk Catalogue. Its the solution to all your problems.

MaxLister sounds like what you’re looking for… it can do basic file searches and can create textfiles and it is freeware.

If you want more advanced features (like comparing the CD’s contents to your harddisk) see search results. There’s a shareware program called WhereIsIt that has advanced features - and there are probably some there that are freeware.


Yeah, but … wooba said:

…so on the Find File results screen, it shows you the full path, right? And so you’d see from the folder name what CD to insert. Insert CD, double-click file showing on Find File screen, song starts playing.

And obtaining the shortcuts doesn’t require scripting or 3rd-party software products.