PC Review


Reply
Thread Tools Rate Thread

Convert file names to a usable list?

 
 
Gary
Guest
Posts: n/a
 
      3rd Jan 2008
Is it possible under Windows XP / Vista to create a database or list from the
names of files from within a directory and subdirectorys?

I want to make a list/database of quite a lot of mp3s so i can order and
print them in either access or excel.

The file structure I use is:

C:\...\Music\artist\artist - title.mp3

Many thanks
Gary
 
Reply With Quote
 
 
 
 
John
Guest
Posts: n/a
 
      3rd Jan 2008

"Gary" <(E-Mail Removed)> wrote in message
news:18C366DE-4069-47DD-B375-(E-Mail Removed)...
> Is it possible under Windows XP / Vista to create a database or list from
> the
> names of files from within a directory and subdirectorys?
>
> I want to make a list/database of quite a lot of mp3s so i can order and
> print them in either access or excel.
>
> The file structure I use is:
>
> C:\...\Music\artist\artist - title.mp3
>
> Many thanks
> Gary


Open up a cmd prompt window.

use the cd command to get to the directory of interest.
You didn't give the full path so I can't spell it out for you.
To go from the Music directory to the artist directory
the command would be
cd artist

You can go one directory at a time or do it all with one
command. If the directory name has any spaces in it
you must enclose the string in double quotes.
i.e.
cd "Documents and Settings"

Once you get to the directory of interest the command

dir > list.txt

will create the list that you want.

Also try

dir /w > list.txt

to see if you prefer that format.



 
Reply With Quote
 
Clamorous
Guest
Posts: n/a
 
      3rd Jan 2008
On Jan 3, 1:05*pm, "John" <noaddr...@noaddress.invalid> wrote:
> "Gary" <G...@discussions.microsoft.com> wrote in message
>
> news:18C366DE-4069-47DD-B375-(E-Mail Removed)...
>
> > Is it possible under Windows XP / Vista to create a database or list from
> > the
> > names of files from within a directory and subdirectorys?

>
> > I want to make a list/database of quite a lot of mp3s so i can order and
> > print them in either access or excel.

>
> > The file structure I use is:

>
> > C:\...\Music\artist\artist - title.mp3

>
> > Many thanks
> > Gary

>
> Open up a cmd prompt window.
>
> use the cd command to get to the directory of interest.
> You didn't give the full path so I can't spell it out for you.
> To go from the Music directory to the artist directory
> the command would be
> cd artist
>
> You can go one directory at a time or do it all with one
> command. *If the directory name has any spaces in it
> you must enclose the string in double quotes.
> i.e.
> cd "Documents and Settings"
>
> Once you get to the directory of interest the command
>
> dir > list.txt
>
> will create the list that you want.
>
> Also try
>
> dir /w > list.txt
>
> to see if you prefer that format.


See if this link will help:
http://support.microsoft.com/kb/321379

Or GOOGLE "print directory list"
 
Reply With Quote
 
Gary
Guest
Posts: n/a
 
      3rd Jan 2008
> > Is it possible under Windows XP / Vista to create a database or list from
> > the
> > names of files from within a directory and subdirectorys?
> >
> > I want to make a list/database of quite a lot of mp3s so i can order and
> > print them in either access or excel.
> >
> > The file structure I use is:
> >
> > C:\...\Music\artist\artist - title.mp3
> >
> > Many thanks
> > Gary

>
> Open up a cmd prompt window.
>
> use the cd command to get to the directory of interest.
> You didn't give the full path so I can't spell it out for you.
> To go from the Music directory to the artist directory
> the command would be
> cd artist
>
> You can go one directory at a time or do it all with one
> command. If the directory name has any spaces in it
> you must enclose the string in double quotes.
> i.e.
> cd "Documents and Settings"
>
> Once you get to the directory of interest the command
>
> dir > list.txt
>
> will create the list that you want.
>
> Also try
>
> dir /w > list.txt
>
> to see if you prefer that format.
>



Thank you, its close to what i need but it doesnt include the subdirectory
of the artist that contains the actual mp3 file - ie. it only lists the
artists.

A typical full path is:

c:\documents and settings\gary\my documents\my music\aerosmith\aerosmith -
love in an elevator.mp3

So you see if I am in the "my music" directory the 'dir > list.txt' command
only lists the artists not the actual music titles. One other problem is that
there maybe cover art, or other file types in some of the directories - is it
possible to only list the .mp3 file types?

Many thanks again
Gary
 
Reply With Quote
 
mayayana
Guest
Posts: n/a
 
      3rd Jan 2008
I'm not clear about how you're going to
use your list, but you can do anything like
that easily with script. It's a little more
work than command line but also less tedious
and primitive.
The following will create a list in any folder.
Just paste the text in Notepad, save as lister.vbs,
and drop a folder onto it. It will write a list of all
MP3 files to a file named list.txt inside the folder.
The list will write the full file paths.

You could also make it recursive, select different
file extensions, etc., if you want to delve into editing
the script.

---------------- script starts below here ---------

Dim FSO, Arg, oFol, oFils, oFil, TS, sList
On Error Resume Next
Arg = WScript.Arguments(0)
Set FSO = CreateObject("Scripting.FileSystemObject")
If FSO.FolderExists(Arg) = False Then
Set FSO = Nothing
WScript.Quit
End If

Set oFol = FSO.GetFolder(Arg)
Set oFils = oFol.Files
For Each oFil in oFils
If UCase(Right(oFil.Name, 3)) = "MP3" Then
sList = sList & oFil.Path & vbCrLf
End If
Next
Set oFils = Nothing
Set oFol = Nothing

Set TS = FSO.CreateTextFile(Arg & "\list.txt", True)
TS.Write sList
TS.Close
Set TS = Nothing

Set FSO = Nothing

MsgBox "List written as " & Arg & "\list.txt"

---------- script ends above here -----------------




> > > Is it possible under Windows XP / Vista to create a database or list

from
> > > the
> > > names of files from within a directory and subdirectorys?
> > >
> > > I want to make a list/database of quite a lot of mp3s so i can order

and
> > > print them in either access or excel.
> > >
> > > The file structure I use is:
> > >
> > > C:\...\Music\artist\artist - title.mp3
> > >
> > > Many thanks
> > > Gary

> >
> > Open up a cmd prompt window.
> >
> > use the cd command to get to the directory of interest.
> > You didn't give the full path so I can't spell it out for you.
> > To go from the Music directory to the artist directory
> > the command would be
> > cd artist
> >
> > You can go one directory at a time or do it all with one
> > command. If the directory name has any spaces in it
> > you must enclose the string in double quotes.
> > i.e.
> > cd "Documents and Settings"
> >
> > Once you get to the directory of interest the command
> >
> > dir > list.txt
> >
> > will create the list that you want.
> >
> > Also try
> >
> > dir /w > list.txt
> >
> > to see if you prefer that format.
> >

>
>
> Thank you, its close to what i need but it doesnt include the subdirectory
> of the artist that contains the actual mp3 file - ie. it only lists the
> artists.
>
> A typical full path is:
>
> c:\documents and settings\gary\my documents\my music\aerosmith\aerosmith -
> love in an elevator.mp3
>
> So you see if I am in the "my music" directory the 'dir > list.txt'

command
> only lists the artists not the actual music titles. One other problem is

that
> there maybe cover art, or other file types in some of the directories - is

it
> possible to only list the .mp3 file types?
>
> Many thanks again
> Gary



 
Reply With Quote
 
HeyBub
Guest
Posts: n/a
 
      4th Jan 2008
Gary wrote:
>
> A typical full path is:
>
> c:\documents and settings\gary\my documents\my
> music\aerosmith\aerosmith - love in an elevator.mp3
>
> So you see if I am in the "my music" directory the 'dir > list.txt'
> command only lists the artists not the actual music titles. One other
> problem is that there maybe cover art, or other file types in some of
> the directories - is it possible to only list the .mp3 file types?
>
> Many thanks again
> Gary


Yes: DIR *.MP3 > text.txt /s (the "/s" means parse subdirectories too)


 
Reply With Quote
 
Gary
Guest
Posts: n/a
 
      4th Jan 2008
Hello Mayayana - thank you so much for the time and effort you have given - I
really didnt expect some to start writing scripts!

I don't think I have been as clear as I should have been.

My goal is to make a list of my '.mp3' only files.
I would like to make an Excel file that lists all my '.mp3' files. Using 2
columns (one for the artist and one for the song title) so I can sort them by
artist and by song title.

The files are all stored in this directory path/file name format:

c:\documents and settings\gary\my documents\my music\artist\artist - title.mp3

All i need in the list is "Artist" and "Title" from the file names, bearing
in mind the mp3 files are in seperate "artist" directories.

I was hoping to use the "-" as the column/field seperator?

I don't know if this is possible?

Thanks again - your help is really appricated.
Gary





"mayayana" wrote:

> I'm not clear about how you're going to
> use your list, but you can do anything like
> that easily with script. It's a little more
> work than command line but also less tedious
> and primitive.
> The following will create a list in any folder.
> Just paste the text in Notepad, save as lister.vbs,
> and drop a folder onto it. It will write a list of all
> MP3 files to a file named list.txt inside the folder.
> The list will write the full file paths.
>
> You could also make it recursive, select different
> file extensions, etc., if you want to delve into editing
> the script.
>
> ---------------- script starts below here ---------
>
> Dim FSO, Arg, oFol, oFils, oFil, TS, sList
> On Error Resume Next
> Arg = WScript.Arguments(0)
> Set FSO = CreateObject("Scripting.FileSystemObject")
> If FSO.FolderExists(Arg) = False Then
> Set FSO = Nothing
> WScript.Quit
> End If
>
> Set oFol = FSO.GetFolder(Arg)
> Set oFils = oFol.Files
> For Each oFil in oFils
> If UCase(Right(oFil.Name, 3)) = "MP3" Then
> sList = sList & oFil.Path & vbCrLf
> End If
> Next
> Set oFils = Nothing
> Set oFol = Nothing
>
> Set TS = FSO.CreateTextFile(Arg & "\list.txt", True)
> TS.Write sList
> TS.Close
> Set TS = Nothing
>
> Set FSO = Nothing
>
> MsgBox "List written as " & Arg & "\list.txt"
>
> ---------- script ends above here -----------------
>
>
>
>
> > > > Is it possible under Windows XP / Vista to create a database or list

> from
> > > > the
> > > > names of files from within a directory and subdirectorys?
> > > >
> > > > I want to make a list/database of quite a lot of mp3s so i can order

> and
> > > > print them in either access or excel.
> > > >
> > > > The file structure I use is:
> > > >
> > > > C:\...\Music\artist\artist - title.mp3
> > > >
> > > > Many thanks
> > > > Gary
> > >
> > > Open up a cmd prompt window.
> > >
> > > use the cd command to get to the directory of interest.
> > > You didn't give the full path so I can't spell it out for you.
> > > To go from the Music directory to the artist directory
> > > the command would be
> > > cd artist
> > >
> > > You can go one directory at a time or do it all with one
> > > command. If the directory name has any spaces in it
> > > you must enclose the string in double quotes.
> > > i.e.
> > > cd "Documents and Settings"
> > >
> > > Once you get to the directory of interest the command
> > >
> > > dir > list.txt
> > >
> > > will create the list that you want.
> > >
> > > Also try
> > >
> > > dir /w > list.txt
> > >
> > > to see if you prefer that format.
> > >

> >
> >
> > Thank you, its close to what i need but it doesnt include the subdirectory
> > of the artist that contains the actual mp3 file - ie. it only lists the
> > artists.
> >
> > A typical full path is:
> >
> > c:\documents and settings\gary\my documents\my music\aerosmith\aerosmith -
> > love in an elevator.mp3
> >
> > So you see if I am in the "my music" directory the 'dir > list.txt'

> command
> > only lists the artists not the actual music titles. One other problem is

> that
> > there maybe cover art, or other file types in some of the directories - is

> it
> > possible to only list the .mp3 file types?
> >
> > Many thanks again
> > Gary

>
>
>

 
Reply With Quote
 
rod
Guest
Posts: n/a
 
      4th Jan 2008
FYI. This is how I do mine.
download and install free "Agent Ransack"
search for *.mp3 it will give you every Mp3 on your computer.

Save (to clipboard) and drop into platform of choice (comma delineated)

I drop mine into MSworks database
The only irritation is that it saves entire path, the workaround is
"find/replace"

so for yours=c:\documents and settings\gary\my documents\my
music\artist\artist - title.mp3
I would "find" c:\documents and settings\gary\my documents\my music\
and replace with blank
You are left with artist/artist title.

Be careful using Excel as a database, sorting columns/fields
an errant keypress may have you lose database integrity.










 
Reply With Quote
 
Bruce Chambers
Guest
Posts: n/a
 
      4th Jan 2008
Gary wrote:
> Is it possible under Windows XP / Vista to create a database or list from the
> names of files from within a directory and subdirectorys?
>
> I want to make a list/database of quite a lot of mp3s so i can order and
> print them in either access or excel.
>
> The file structure I use is:
>
> C:\...\Music\artist\artist - title.mp3
>
> Many thanks
> Gary



From the command prompt (Start > Run > Cmd.exe), simply change to
the desired directory and type "dir > filelist.txt" or "dir > lpt1,"
just as you used to do in DOS. Any of the switches for the DIR command
(type "dir /?") will work with this command, if you wish to modify the
output. You can then subsequently edit the resulting text file using
NotePad, WordPad, Word, etc.

Alternatively:

HOW TO Add a Print Directory Feature for Folders in Windows XP
http://support.microsoft.com/?kbid=321379

Directory Lister
http://www.krksoft.com/index.php



--

Bruce Chambers

Help us help you:
http://www.catb.org/~esr/faqs/smart-questions.html

They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety. ~Benjamin Franklin

Many people would rather die than think; in fact, most do. ~Bertrand Russell

The philosopher has never killed any priests, whereas the priest has
killed a great many philosophers.
~ Denis Diderot
 
Reply With Quote
 
mayayana
Guest
Posts: n/a
 
      4th Jan 2008

> c:\documents and settings\gary\my documents\my music\artist\artist -

title.mp3
>
> All i need in the list is "Artist" and "Title" from the file names,

bearing
> in mind the mp3 files are in seperate "artist" directories.
>
> I was hoping to use the "-" as the column/field seperator?
>
> I don't know if this is possible?
>


Well, this is a bit like Jack Sprat and his wife.
You don't do script and I don't do Excel.
What you want is very easy, but I assume you
want a text file list that Excel can digest, and I
don't know anything about Excel.
If you can provide the exact syntax of a line
that's usable to Excel (something like artist, filename
maybe?) I can give you an edited script. It only
takes a minute.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I convert a list of names and addresses in word into Outlook? Cindy Microsoft Word Document Management 1 22nd Aug 2008 05:35 AM
convert word document list of names to excel spreadsheet =?Utf-8?B?Y2NhcmV5QHVnYS5lZHU=?= Microsoft Word Document Management 1 29th May 2007 08:42 PM
how do i convert a List of names onto labels? =?Utf-8?B?RmFpcnk=?= Microsoft Word Document Management 2 27th Apr 2007 07:22 AM
File Names: List Long file Names from Database List of short file names Ben Microsoft VB .NET 4 6th May 2006 01:20 AM
List names of attached e-mail file names CMO Microsoft Outlook Program Addins 0 24th May 2004 07:09 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:39 PM.