quicksilver Posted October 7, 2006 Posted October 7, 2006 Hallo ich habe einen Ordner in dem sich mehrere hunderte mp3z befinden. Diese sind wie folgt benannt: Interpret - Titel.mp3 Ich möchte nun den Interpreten aus dem Dateinamen auslesen Für den Interpreten ein Ordner erstellen. Das Mp3 File dort dann reinverschieben. Also das mit dem Ordner usw bekomme ich ja hin aber das Extrahieren des Interpreten ist mein Problem. Vielen Dank für die HIlfe!
Das Ami Posted October 7, 2006 Posted October 7, 2006 HiProbier mal Magic Mp3 Tagger das Programm macht so ziemlich dasselbe.Noch n kleiner Tipp am Rande, wenn du englisch schreibst kriegst du bestimmt mehr antworten als in Deutsch.
quicksilver Posted October 7, 2006 Author Posted October 7, 2006 Ja aber das tool ist shareware. Und kann wieder viel zu viel.. möchte nur diese Funktion.
jvanegmond Posted October 7, 2006 Posted October 7, 2006 I'm not good at german. But here's a bit of example code: $filename = "Interpret - Titel.mp3" $array = StringSplit($filename, "-.") For $x = 1 to $array[0] $Output = StringStripWS($array[$x],3) MsgBox(0, "Example code: ", $Output) Next Your next step would be to understand what each function does, and rewrite this so that it fits your needs. github.com/jvanegmond
MHz Posted October 7, 2006 Posted October 7, 2006 quicksilver, your previous topics were in english. So why the change?
Xenobiologist Posted October 7, 2006 Posted October 7, 2006 Hi, na da scheint dir ja schon geholfen. PS: es gibt auch ein gutes Deutsches Forum 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
jvanegmond Posted October 7, 2006 Posted October 7, 2006 ok Thx thats the command i need You're welcome. Thanks for letting me practice my german here. github.com/jvanegmond
quicksilver Posted October 7, 2006 Author Posted October 7, 2006 (edited) Hehe No Problem Now here ist the mini Tool to "Organize" the mp3 Files Has anyone a tip to complete the tool? Errors? Bugs? ..? Thx for help #include <file.au3> $filenames = @ScriptDir&"\*.mp3" $search = FileFindFirstFile($filenames) ; Check if the search was successful If $search = -1 Then MsgBox(0, "Error", "Keine Mp3 Dateien gefunden") Exit EndIf While 1 $file = FileFindNextFile($search) If @error Then ExitLoop $rdyname = StringSplit($file,"-.") $folder = @ScriptDir&"\"&$rdyname[1] DirCreate($folder) $filesource = @ScriptDir&"\"&$file $filemove = @ScriptDir&"\"&$rdyname[1]&"\"&$file FileMove($filesource, $filemove) WEnd ; Close the search handle FileClose($search) Edited October 7, 2006 by quicksilver
quicksilver Posted October 7, 2006 Author Posted October 7, 2006 Hm theres a Problem. He creates the folders. But when he trys to copy the File is a blank in the rdyname variable. And when he trys to Copy the file from $filesource to $filemove the Foldername of the Filemove is Wrong because the Blank is too much. Eg. Wrong: c:\test\Artist - Title.mp3 => c:\test\Artist \Artist - Title.mp3 Right: c:\test\Artist - Title.mp3 => c:\test\Artist\Artist - Title.mp3 In the Variable $rdyname[1] is a Blank to much
Xenobiologist Posted October 7, 2006 Posted October 7, 2006 HI, my try: #Include <File.au3> $FileList = _FileListToArray(@ScriptDir, "*.mp3", 1) If (Not IsArray($FileList)) And (@error = 1) Then MsgBox(0, "", "No Files\Folders Found.") Exit EndIf For $i = 1 To UBound($FileList) - 1 $r = StringSplit($FileList[$i], " - ") DirCreate(@ScriptDir & "\" & $r[1]) FileMove(@ScriptDir & "\" & $FileList[$i], @ScriptDir & "\" & $r[1]) Next 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
quicksilver Posted October 7, 2006 Author Posted October 7, 2006 Fine but.. with this code ist Only the First Name of the Artist the Name of The Folder.. not the Full name.. Like: Justin but right is Justin Timberlake
jvanegmond Posted October 7, 2006 Posted October 7, 2006 Solution: Don't listen to Justin Timberlake. Heeheee github.com/jvanegmond
Xenobiologist Posted October 7, 2006 Posted October 7, 2006 Hi, try without the blanks. #Include <File.au3> $FileList = _FileListToArray(@ScriptDir, "*.mp3", 1) If (Not IsArray($FileList)) And (@error = 1) Then MsgBox(0, "", "No Files\Folders Found.") Exit EndIf For $i = 1 To UBound($FileList) - 1 $r = StringSplit($FileList[$i], "-") DirCreate(@ScriptDir & "\" & $r[1]) FileMove(@ScriptDir & "\" & $FileList[$i], @ScriptDir & "\" & $r[1]) Next 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
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