Kivin Posted January 25, 2007 Share Posted January 25, 2007 Hi everyone! There is a file some like this (*.m3u) It has next lines: #EXTINF:240,049 Coolio Feat L.V. - Gangsta's Paradise D:\COOLIO FEAT L.V. - GANGSTAS PARADISE.MP3 #EXTINF:253,50 CENT - PLACES TO GO D:\50 CENT - PLACES TO GO.mp3 #EXTINF:223,THE RZA - FATAL D:\THE RZA - FATAL.mp3 #EXTINF:227,Vanilla Ice - Ice Ice Baby D:\Vanilla Ice - Ice Ice Baby.ogg etc. How could I read only strings with path & pass #EXTINF:... lines? Also I want to know how to scan folder & find all files with same letters combination (for example *.lng) Link to comment Share on other sites More sharing options...
Xenobiologist Posted January 25, 2007 Share Posted January 25, 2007 Hi, _FileListToArray and StringInstr or StringLeft = will help you. So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
sandyd Posted January 25, 2007 Share Posted January 25, 2007 1. From the Help file, with a little modding: $file = FileOpen("test.m3u", 0) ; Check if file opened for reading OK If $file = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf ; Read in lines of text until the EOF is reached While 1 $line = FileReadLine($file) If @error = -1 Then ExitLoop If Not StringInStr($line,'#EXTINF') Then MsgBox(0, "Line read:", $line) EndIf Wend FileClose($file) oÝ÷ Ûak¢h^âæ j)ðØZ+mé¨uا«¢+Ø(%¹±Õ±Ðí¥±¹ÔÌÐì(%¹±Õ±ÐíÉÉä¹ÔÌÐì(ÀÌØí¥±1¥ÍÐõ}¥±1¥ÍÑQ½ÉÉä¡ÍѽÁ¥È°Ìä쨹±¹¬Ìäì°Ä¤)%¡9½Ð%ÍÉÉä ÀÌØí¥±1¥ÍФ¤¹¡ÉɽÈôĤQ¡¸(5Í ½à À°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½Ðí9¼¥±ÌÀäÈí½±É̽չ¸ÅÕ½Ðì¤(á¥Ð)¹%)}ÉÉå¥ÍÁ±ä ÀÌØí¥±1¥ÍаÅÕ½ÐìÀÌØí¥±1¥ÍÐÅÕ½Ðì¤( ----[ SandyD ]--- Link to comment Share on other sites More sharing options...
Kivin Posted January 25, 2007 Author Share Posted January 25, 2007 Thank you for help! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now