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.
:huh:
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.
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.
My Computer
- Computer type
- Laptop
- Computer Manufacturer/Model Number
- Asus
- OS
- Windows 7 Pro 64bit
- CPU
- 2670QM
- Motherboard
- ASUS N53SN/Intel HM65
- Memory
- 8GB
- Graphics Card(s)
- Nvidia GeForce GT 550m + Intel HD Graphics 3000
- Hard Drives
- Samsung HM500JJ
- Antivirus
- Comodo CIS
- Browser
- Pale Moon
(I'm not a Windows programmer).