Massage Therapist

So, this has been on my mind for a while. I’ve got like 4300 mp3 files, from cds I own, of course, and I want to list them in an Access database so when I…go out to buy more cds I’m not getting duplicate songs. Also, it’d be convenient to be able to sort them by size, so when I get ready to burn a cd, I dont end up with wasted space, or have to drop songs at the last minute.

The problem being that entering them by hand is incredibly labor intensive, and there’s nothing in the windows drop-downs that says anything like “copy directory listings to clipboard”. Try to copy and paste the listings, and the bloody OS either refuses to do it, or attempts to insert links to 4000+ files into a word doc.

If I can get the raw data into a text file, I’m golden. I spent years at net32.com putting the Word and Excel files typed up by the drunken monkeys who ran our vendors into Access, then moving them to the production db. Trouble is, up until now I’ve not been able to figure it out. There’s probably a windows tool somewhere that does it, but I’ve never found one at download.com. Likely there is a correct term for such a tool, but I don’t know it, so my searches are in vain.

So, like the fellow says, I turned the desire over to my subconscious and let it stew there. Eventually I realize that ms-dos, being at least superficially like Unix, might support command line i/o redirection. Everyone more technical than me solved this problem in the second paragraph and left, so I’ll explain what command line redirection is.

Essentially, Unix lets you take the output of a command, like “date” and mess with it, should you desire to do so. Here’s what the “date” command and the output thereof looks like unmolested.

$ date

Mon May 20 20:32:36 EDT 2002

Now, should I for some reason not want the actual output to appear on my screen, I can tell it to go elsewhere. Here I tell the date to go to Hell.

$ date >> Hell
$

Note that what I get back is not the date, but a command prompt. The date is writhing in agony as gibbering demons, excuse me, daemons, poke it in the unmentionables with red-hot forks.

Well, no. What has actually happened is that the Unix shell has taken the command and put it into a file called Hell. It doesn’t matter if the file was there beforehand. If Unix looks around and doesn’t see Hell, it creates it, and sticks the output from the date command into it.

So what Sub has told me to do is to bring up a ms-dos window, go to the mp3 folder and run the “dir” command, like this;

C:\WINDOWS>cd ..

C:\>cd mp3s

C:\mp3s>dir >> temp1.txt

The only things I typed above were “cd..”,”cd mp3s” and “dir >> temp1″

C:\WINDOWS>, C:\> and C:\mp3s> are ms-dos versions of the command prompt.They tell me where I am at any particular moment. Unix can be set to do the same thing.

I start out in the WINDOWS folder, change directory (cd) to the C: folder above it. (The two dots are just a command line convention than mean “folder above this one”. It’s more correctly known as the parent folder. One dot means “this folder”. No dots means “you forgot the rest of the command”. Well, no it doesn’t. It actually takes you back to the directory you started from, your “home” directory. Then I cd into the mp3s directory and run the “dir” command (short for directory). This normally lists all of the files in a particular folder, but I’ve redirected “>>” them into a file I’ve called temp1.txt. I added the .txt so that I can go back to windows and open it up with Word or Notepad.

It looks something like this;

THEWIG~1 MP3 1,867,904 04-06-02 12:10p The Wiggles – Teddy Bear Hug.mp3
THEWIG~2 MP3 1,966,080 04-06-02 4:42p The Wiggles – The Monkey Dance.mp3
THEWIG~3 MP3 1,370,112 04-06-02 1:24p The Wiggles – Rock A Bye Bear.mp3
THEWIG~5 MP3 2,327,220 04-06-02 5:14p The Wiggles – Uncle Noah’s ark.mp3

Woo-hoo!

Next, stroking data

Comments are closed.