vbs循环产生的参数的传递问题
2007年11月30日
Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFile = objFSO.OpenTextFile("d:1 .txt", 1)
set WshShell = WScript.CreateObject("WScript.Shell")
strFolder = "d:1"
Do Until objFile.AtEndOfStream
strLine = objFile.ReadLine
filename = strLine
Set objFile = objFSO.GetFile(filename)
set oShellLink = WshShell.CreateShortcut(strFolder & objFSO.GetBaseName(filename) & ".lnk")
oShellLink.TargetPath = objFile
oShellLink.WindowStyle = 1
oShellLink.WorkingDirectory = objFSO.GetParentFolderName(filename)
oShellLink.Save
Loop
objFile.Close
这个只传递一次就完了