; FileList = IndexPlusOne = Index = 0; Path = Folder = Extensions := "wav,aif,aiff" { Gui, Add, Text,, Gui, Add, Text,, Main Folder Path: Gui, Add, Edit, w480 vFolderPath Gui, Add, Text,, Gui, Add, Button, x10 y140 cBlue gStart, START Gui, Add, Button, x436 y140 cBlue gCancel, CANCEL Gui, Show, AutoSize return } GuiClose: Cancel: ExitApp Start: Gui, Submit Loop, %FolderPath%\*.*, 1, 0 { FileDelete %A_LoopFileFullPath%\%A_LoopFileName%.bmk Path = %A_LoopFileFullPath% Folder = %A_LoopFileName% Loop, %A_LoopFileFullPath%\*.* { if A_LoopFileExt in %Extensions% ++IndexPlusOne FileAppend, , %Path%\%Folder%.txt ++Index } VarNewText = FileRead, Var1, %A_LoopFileFullPath%\%A_LoopFileName%.txt FileDelete, %A_LoopFileFullPath%\%A_LoopFileName%.txt FileAppend, %VarNewText%, %A_LoopFileFullPath%\%A_LoopFileName%.txt FileAppend, %Var1%, %A_LoopFileFullPath%\%A_LoopFileName%.txt FileAppend, , %A_LoopFileFullPath%\%A_LoopFileName%.txt FileMove, %A_LoopFileFullPath%\%A_LoopFileName%.txt, %A_LoopFileFullPath%\%A_LoopFileName%.bmk IndexPlusOne = 0 Index = 0 } ExitApp