txt-files from folder contents

  • Thread starter Thread starter Rod
  • Start date Start date
R

Rod

Looking for something that exports my mp3-folder to a txt-file, without
showing the path and the extension.
I want to export the names of the files, not the tags.
example:

D:\Music contains the folders AM and NZ, each folder contains mp3 files.
like:

D:\Music\AM\something.mp3
D:\Music\AM\trallala.mp3
D:\Music\NZ\song.mp3

I want to generate a txt-file which shows:

something
song
trallala

I googled and strained my brain in DOS, but I came up empty. Could be my
hangover. Help is appreciated.
Anyone ?
 
Rod said:
Looking for something that exports my mp3-folder to a txt-file, without
showing the path and the extension.
I want to export the names of the files, not the tags.
example:

D:\Music contains the folders AM and NZ, each folder contains mp3 files.
like:

D:\Music\AM\something.mp3
D:\Music\AM\trallala.mp3
D:\Music\NZ\song.mp3

I want to generate a txt-file which shows:

something
song
trallala

I googled and strained my brain in DOS, but I came up empty. Could be my
hangover. Help is appreciated.
Anyone ?

Edit: Only stand-alones please.
 
Looking for something that exports my mp3-folder to a txt-file, without
showing the path and the extension.
I want to export the names of the files, not the tags.
example:

D:\Music contains the folders AM and NZ, each folder contains mp3 files.
like:

D:\Music\AM\something.mp3
D:\Music\AM\trallala.mp3
D:\Music\NZ\song.mp3

I want to generate a txt-file which shows:

something
song
trallala

I googled and strained my brain in DOS, but I came up empty. Could be my
hangover. Help is appreciated.
Anyone ?
http://www.gasanov.net/Mp3ListShellEx.htm
 
Rod said:
I googled and strained my brain in DOS, but I came up empty. Could be my
hangover. Help is appreciated.
Anyone ?
</snip>

'// Stripfiles.vbs

Option Explicit
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Dim objFSO, objFldr, objFl, sFile, objStream

'// Create the FileSystemObject
Set objFSO = CreateObject("Scripting.FileSystemObject")
'// Get our text file
sFile = "D:\music.txt"
Set objStream = objFSO.OpenTextFile(sFile, ForAppending, True)
'// Get the folder
Set objFldr = objFSO.GetFolder("D:\Music\AM")
For Each objFl in objFldr.Files
objStream.WriteLine StripFilename(objFl.Name)
Next

Set objFSO = Nothing
Set objStream = Nothing
Set objFldr = Nothing
Set objFl = Nothing

Function StripFilename(strFile)
dim sTemp
sTemp = Split(strFile, "\")
StripFilename = sTemp(UBound(sTemp))
End Function

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!
 
<snipped>

I should mention, that was off the top of my head (though tested it on my 2K
machine before posting and it worked like a charm), so if you're wanting it
to do something else, let me know.

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!
 
Rod said:
Looking for something that exports my mp3-folder to a txt-file,
without showing the path and the extension.
I want to export the names of the files, not the tags.
example:

D:\Music contains the folders AM and NZ, each folder contains mp3
files. like:

D:\Music\AM\something.mp3
D:\Music\AM\trallala.mp3
D:\Music\NZ\song.mp3

I want to generate a txt-file which shows:

something
song
trallala

I googled and strained my brain in DOS, but I came up empty. Could be
my hangover. Help is appreciated.
Anyone ?

Best one I know is MP3Lister. Highly configureable as to what is
listed; list format can be text, CSV (any separator), HTML. No help but
a few moments messing with it will enable anybody - almost anybody - to
figure it out.
http://www.codevisions.de/

--
dadiOH
____________________________

dadiOH's dandies v3.05...
....a help file of info about MP3s, recording from
LP/cassette and tips & tricks on this and that.
Get it at http://mysite.verizon.net/xico
 
<snipped>

I should mention, that was off the top of my head (though tested it on
my 2K machine before posting and it worked like a charm), so if you're
wanting it to do something else, let me know.

Thanks for your reply and effort Steven.
On my win98SE it creates a txt-file from only the first folder and the file
extensions are still there.
From the example:

D:\Music\AM\something.mp3
D:\Music\AM\trallala.mp3
D:\Music\NZ\song.mp3

it creates this music.txt file:

something.mp3
trallala.mp3

where I want it to create:

something
song
trallala

I love the idea of a small script, but have absolutely no knowledge of vbs.
 
To get rid of the extension, replace

StripFilename(objFl.Name)

with

Replace(StripFilename(objFl.Name), ".mp3", "")

With regard to the folder, I've only written it to do one folder, you can
modify it to do more than one by either;

1. Asking it to do sub-folders aswell (not really reccomended if there's a
ton of them)
2. Changing the sPath variable after it's done the first folder;

To do the latter, add objSFldr at the end of the Dim.... line, then replace
the For/Next code with;

For Each objSFldr in objFldr.SubFolders
For Each objFl in objFldr.Files
objStream.WriteLine Replace(StripFilename(objFl.Name), ".mp3", "")
Next
Next

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!
 
I keep an old version of Winamp(2.22) to make similar playlists for
listening with Foobar2000.
Example: (from my Billboard top 20 playlist;-) )

01_-_Boulevard_Of_Broken_Dreams.mp3
02_-__eading_Us_Along_.mp3
03 Fall To Pieces.mp3
04 Getting_Away_with_Murder.mp3
05So_Cold.mp3
06burning_bright.mp3
07 Home.mp3
08Vertigo.mp3

File extension is .m3u but could be changed easily enough.

regards

Dud
 
Rod said:
Looking for something that exports my mp3-folder to a txt-file,
without showing the path and the extension.
I want to export the names of the files, not the tags.
example:

D:\Music contains the folders AM and NZ, each folder contains mp3
files. like:

D:\Music\AM\something.mp3
D:\Music\AM\trallala.mp3
D:\Music\NZ\song.mp3

I want to generate a txt-file which shows:

something
song
trallala

I googled and strained my brain in DOS, but I came up empty. Could be
my hangover. Help is appreciated.
Anyone ?

Try this:
homepage: http://home.autocom.pl/mrowka/freeware/dl.html
download: http://home.autocom.pl/mrowka/freeware/DirLister.rar
s...
 
dadiOH said:
Best one I know is MP3Lister. Highly configureable as to what is
listed; list format can be text, CSV (any separator), HTML. No help but
a few moments messing with it will enable anybody - almost anybody - to
figure it out.
http://www.codevisions.de/

Thanks, it looked nice, but was very slow and the output was buggy. AAbout
20% of the files listed were listed with their full path-name.
 
I've modified the script to do sub-folders aswell (same URL)

Thanks Steven. Too bad it still doesn't include subfolders in the output.
The modification for the extension removal gave me an error on the script
(something about bad use of quotationmarks)
 
Looking for something that exports my mp3-folder to a txt-file, without
showing the path and the extension.

Within Win2k or later it would have been:

for /R %i in (*.mp3) do echo %~ni >> mp3.out

But you said somewhere that you have Win98. So you should try Locate 1.31:

http://www.highfiber.com/~raster/freeware.htm

The following search should do fine:

locate D:\Music\*.mp3 /O:"&V" > mp3.lst

Else you have to experiment a bit with the options of the Locate program.

BeAr
 
Rod,
I've just checked and re-uploaded it and it worked just fine on this
machine (2K Pro) and my XP pro machine.

http://support.it-mate.co.uk/downloads/stripfiles.zip

Make sure you are changing the path (Line 53) to "D:\Music" and the
file (line 50) to "D:\<filename>.txt"

Thanks Steven, I started clean over to check again. I downloaded your
script again.
Changed line 50 to: sFile = "D:\blabla.txt"
Changed line 53 to: sPath = "D:\Music"

The script created this file: D:\blabla.txt

It only showed files present in D:\Music, NOT files listed in it's
subfolders.
Good the file-extensions are gone in the output file.
Again, I'm on win 98SE.
I even went against my principles and went to the url given in your script,
downloaded and installed Windows Script 5.6 (again) and rebooted before I
ran your script.
I can't ask for more of your time and energy. I want to thank you for your
efforts. I'll try to be friends with google again and see if it turns
anything up.
 
Back
Top