New
#1
Classic Shell/Explorer Custom Command
Hi,
I've created a Custom Command under Classic Explorer that invokes a VBS script. If the command contains E:\abcdef.vbs, it works. If, however, I change it to E:\abcdef.vbs "%3", nothing happens, even though there is no reference to the argument within the script.
For what it's worth, here is the script:
Dim WshShell, objFSO, FileList, strFileName, MKLCommand, I
Set WshShell = WScript.CreateObject("WScript.Shell")
Const ForReading = 1
'FileList = WScript.Arguments(0)
FileList="F:\Global Temp\ceiA611.tmp"
WScript.Echo FileList
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile(FileList, ForReading)
Do Until objTextFile.AtEndOfStream
strNextLine = objTextFile.Readline
I = InStrRev(strNextLine,"\")
strFileName = Right(strNextLine,Len(strNextLine)-I)
MKLCommand = "cmd.exe /c mklink ""E:\FPVTemp\" & strFileName & """ """ & strNextLine & """"
WshShell.Run(MKLCommand)
Loop
Any suggestions would be appreciated.
Thanks.