07-24-2023, 09:30 AM
I'm using the following script in Windows 7/10 to open a file dialog and allow the user to select a file. It's not allowing me to select multiple files even with the multiple attribute added. According to [this](
Set wShell = CreateObject("WScript.Shell")
Set oExec = wShell.Exec("mshta.exe ""about:<input type=file id=FILE name=file multiple><script>FILE.click();new ActiveXObject('Scripting.FileSystemObject').GetStandardStream(1).WriteLine(FILE.value);close();resizeTo(0,0);</script>""")
sFileSelected = oExec.StdOut.ReadLine
WScript.Echo sFileSelected
[To see links please register here]
), I should be able to use the multiple attribute with `<input type="file">` to select multiple files.Set wShell = CreateObject("WScript.Shell")
Set oExec = wShell.Exec("mshta.exe ""about:<input type=file id=FILE name=file multiple><script>FILE.click();new ActiveXObject('Scripting.FileSystemObject').GetStandardStream(1).WriteLine(FILE.value);close();resizeTo(0,0);</script>""")
sFileSelected = oExec.StdOut.ReadLine
WScript.Echo sFileSelected