$filename(O:\TEST\BuildCat_BPM.vbs) '''Script proposal how to create a folder tree full of link files, which point to their physical dependancies.' '''The Mp3tag export feature creates and fills this VB script file with proper values.' '''(c)20100913.Detlev Dalitz.' '''Info:' '''Value ==> "Foldername"' $loop(%BPM%,1)'''BPM('%BPM%') ==> "'$if2('BPM '$num(%BPM%,3),'BPM 000')'"' $loopend() $puts(My_RootFolder,'O:\TEST\BPM\') '''Create a WshShell Object' 'Set objShell = Wscript.CreateObject ("Wscript.Shell")' '''Give user the chance to abort' 'intBtnCode = objShell.Popup ("Create Foldertree and Linkfiles?" & vbLf & "'$get(My_RootFolder)'", 0, "VBS Question", 1 + 32)' 'Select Case intBtnCode' 'Case 2' 'Set objShell = Nothing' 'WScript.Quit 255' 'End Select' '''On Error Resume Next' $loop(%BPM%,1) $puts(My_RootFolder,'O:\TEST\BPM\') $puts(My_Folder,$if2('BPM '$num(%BPM%,3),'BPM 000')'\') $puts(My_Folderpath,$get(My_RootFolder)$get(My_Folder)) '''Create Folderpath' 'intResult = objShell.Run ("CMD.EXE /C MD ""'$get(My_Folderpath)'""", 0, true)' $loop(%BPM%) $puts(My_RootFolder,'O:\TEST\BPM\') $puts(My_Folder,$if2('BPM '$num(%BPM%,3),'BPM 000')'\') $puts(My_Folderpath,$get(My_RootFolder)$get(My_Folder)) '''File: "'%_path%'"' '''Create a WshShortcut Object' 'Set objShellLink = objShell.CreateShortcut ("'$get(My_Folderpath)%_filename_ext%'.lnk")' '''Set the target filepath for the shortcut' 'objShellLink.TargetPath = "'%_path%'"' '''Set the additional parameters for the shortcut' 'objShellLink.Arguments = ""' '''Set the working folder' 'objShellLink.WorkingDirectory = "'%_folderpath%'"' '''Save the shortcut' 'objShellLink.Save' '''Clean up the WshShortcut Object' 'Set objShellLink = Nothing' $loopend() $loopend() '''Display ready message' 'intBtnCode = objShell.Popup ("Foldertree and Links created.", 5, "VBS Info", 0)' '''Open explorer window' 'intResult = objShell.Run ("explorer.exe /e,/select,""'$get(My_Rootfolder)'""", 3, false)' '''Clean up the WshShell Object' 'Set objShell = Nothing' 'WScript.Quit 0'