DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: [FBSL] M3u list generator  (Read 4,758 times)

Gerome

  • Charter Honorary Member
  • Joined in 2006
  • ***
  • Posts: 154
[FBSL] M3u list generator
« on: September 09, 2006, 10:02 AM »
Hello,

For people who cares about generating rapidly an M3u list, here's a quick tool that will do it for you.

Just compile it with FBSL and place the compiled file into a known path.

Then from any command line or alike (FARR), you just have to change dir and execute M3u.exe.
Nothing else to do, then the M3u list file will be generated into the target dir!

Enjoy it! 8)

Code: (vbnet)
#Option Explicit
#AppType Console

' ----------------------------
' -- M3u list generator
' -- GEG 09-09-2006
' ----------------------------

M3u(".\*.mp3", ".\_List.m3u")

Sub M3u($what, $where)
	CD CurDir()
	Dim %fp, $c, $big, $fil = FindFirst(what), $m3u = where

	While fil <> ""
		big = big & fil & CRLF
		fil = FindNext
	Wend

	If Len(big) Then
		fp = FileOpen(m3u, OUTPUT)
		If fp Then
			FilePrint(fp, big)
			FileClose(fp)
		Else
			Print "Error while opening ", m3u
		End If
	End If

	Print "Do you want to hear the playlist now [Y]es, [N]o ?";
	Do
		c = UCase(ReadChar())
	Loop While c = CR OrElse c = LF

	If c = "Y" AndAlso FileExist(m3u) Then
		ApiCall("ShellExecute", "Shell32", NULL, "open", m3u, "", "", SW_SHOW)
	Else
		Print "See you later!"
		Sleep(1000)
	End If
End Sub
Yours,
(¯`·._.·[Gerome GUILLEMIN]·._.·´¯)
http://www.fbsl.net [FBSL Author]
http://gedd123.free.fr/FBSLv3.zip [FBSL Help file]
(¯`·._.·[If you need help... just ask]·._.·´¯)
« Last Edit: September 09, 2006, 11:28 AM by Gerome »

Original address: https://www.donationcoder.com/forum/index.php?topic=5185.0