"Copy as Text" from Windows Explorer
October 15, 2005 8:21 AM   Subscribe

I'm looking for a Windows tool that will allow you to "Copy as Text" from Windows Explorer. Anybody know of anything?

I have hundreds of mp3s containing the artist and song name in the file itself (e.g. Artist_-_Album_-_Track_-_Song.mp3). I want to be able to open the directory where these files are located with Windows Explorer, select them all, right-click, and select "Copy as Text", so that I can paste the information into Excel for manipulation. Any thoughts?

Currently, I am Exploring to the directory, using "Open Command Window Here" to bring it up in a cmd window, running a "dir" command, right-clicking, select all-ing, pressing enter to copy, pasting it into notepad, getting rid of the unnecessary stuff (date stamp, filesize, etc.), and THEN pasting it into Excel. Boy, it sure would be nice to cut out the middlemen.

I am open to alternatives to Windows Explorer that provide this functionality, or ways to just get the information I need (i.e. filename) from a command line. Ultimately though, I would prefer a "plug-in" for Windows Explorer. Thanks in advance.
posted by bwilms to Computers & Internet (12 answers total) 1 user marked this as a favorite
 
You just need the FOR command - something like

FOR /f "tokens=*" %G IN ('dir c:\music\*.mp3 | find "/"') DO echo %G >>Mylisting.txt

or in a batch file:

FOR /f "tokens=*" %%G IN ('dir c:\music\*.mp3 ^| find "/"') DO echo %%G >>Mylisting.txt
posted by Lanark at 8:50 AM on October 15, 2005


dir /b *.mp3 > songs.txt
posted by jikel_morten at 9:00 AM on October 15, 2005


I use wordperfect for this. Go to the open file dialogue box. Navigate to your folder of choice Click the "file" menu then click "Print File list". If you want to put it in excel, choose "open in wordpad" and then copy and paste it from there. I just did it and the columns were parsed appropriately and went into excel with no problem.

(There's also an option to copy it to the clipboard directly in rtf format, but I just tried it and excel won't accept the paste.)
posted by duck at 9:01 AM on October 15, 2005


Or, songs.xls instead of .txt and you get a song on each line. Not sure if this helps...
posted by jikel_morten at 9:02 AM on October 15, 2005


dir > filelist.txt

Open filelist.txt in your favorite text editor, select all, copy, switch apps, paste. Or perhaps directly import into Excel.

You may want to set a few options on the dir command. Look at the output of dir /? for them. Things like descending into subdirectories or printing only the filenames and not the sizes, etc.
posted by xiojason at 10:48 AM on October 15, 2005


Like jikel said. :)
posted by xiojason at 10:48 AM on October 15, 2005


Oscar's Renamer is basically a text editor for file listings in an explorer-type view, and will let you copy a whole list for pasting as well as doing all of the naming sorts of things it specifically features.
posted by salt at 10:52 AM on October 15, 2005


jikel_morten: Cool. That's a nice simple line for someone who is not a command line guru (like myself).

One more question: can I have this command run through several subdirectories and create one big text file? Or will I have to go to directory individually? Thanks again.

salt: Oscar's Renamer is not exactly what I had in mind, but it does just what I need it to do. I'm sure I'll find other uses for it too. Thanks for the link.
posted by bwilms at 1:05 PM on October 15, 2005


If you're using dir, add "/s" to recurse into subdirectories.

You can combine this with a clipboard utility (I don't have the name of one handy) such that you do "dir /b/s *.mp3 | cliputil" and it will send the output directly to the clipboard.

Or, if you use Cygwin you can just do "ls -1R > /dev/clipboard".

You can install these commands to be available as a right click on a folder in Explorer. You can do this either by placing a shortcut to the command in your "Send to" folder, or by adding a key to HKCR\Folder\shell\name\Command, where 'name' is the name you want to appear on the menu, and the contents of the ky are the command to run.

You can also get a shell extension to do this.
posted by Rhomboid at 2:37 PM on October 15, 2005


Copy and paste from IE to Notepad. Copy and paste from Notepad to Excel. (Notepad is text-only so all the other junk goes away)
posted by winston at 5:42 PM on October 15, 2005


if you use a bare dir you get a bunch of header and footer cruft. Use dir /b > songs.xls to just get the bare file names, one per line. Or dir /b/s >song.xls to recurse thru all directories.
posted by Mitheral at 7:05 PM on October 15, 2005


Another extension to do just this is the Sendto X Powertoy from Microsoft. It installs a "Send to > Clipboard as Name" option.
posted by xulu at 7:34 PM on October 15, 2005


« Older Where can I find some lugged-s...   |  What do I call this hat and wh... Newer »
This thread is closed to new comments.