raytc wrote: 2022-02-10, 09:09 UTC
I checked it with the question mark at the start of the parameters.
I noted that %L puts the temporary directory in the arguments list (?C:\Users\xxx\AppData\Local\Temp\CMDD5E9.tmp)
and not the names of the selected files.
"%L" and related parameters are replaced by the path to a temp file which contains all selected files,
line by line. Folders has trailing backslash there.
You have to parse that content with your script and act line by line.
Right click at an button in the buttonbar and chose Modify...
In that dialog press F1-key for to read the help with all possible parameters.
Like %S - insert the names of all selected files into the command line. Names containing spaces will be surrounded by double quotes.
Please note the maximum command line length of 32767 characters.
Example parsing code in VBS:
Code: Select all
Call as: path\myscript "%L" "%T"
sTCtempList = Wscript.arguments.Item(0) ' The TC temp file due to the "%L" parameter
'strTCTarget = Wscript.arguments.Item(1) ' The Target panel due to the "%T" parameter
Set FSO = CreateObject("Scripting.FileSystemObject")
Set objFile = FSO.OpenTextFile(sTCtempList, 1)
Do While Not objFile.AtEndOfStream
strCurrItem = objFile.ReadLine
If(strCurrItem <> "") Then
If Right(strCurrItem,1) = "\" Then
Create_FolderStructure(strCurrItem)
ElseIf InStr(strCurrItem, "\") > 0 Then
sPartPath = FSO.GetParentFolderName(strCurrItem)
sPartFile = FSO.GetFileName(strCurrItem)
Create_FolderStructure(sPartPath)
FSO.CreateTextFile(sPartPath&"\"&sPartFile)
Else
FSO.CreateTextFile(strCurrItem)
End If
End If
Loop
Function Create_FolderStructure
...
End Function
Example only, many things may be missed here.