vbs循环产生的参数的传递问题
发布时间:2016-12-28 来源:查字典编辑
摘要:SetobjFSO=CreateObject("Scripting.FileSystemObject")SetobjFile=objFSO....
SetobjFSO=CreateObject("Scripting.FileSystemObject")
SetobjFile=objFSO.OpenTextFile("d:1.txt",1)
setWshShell=WScript.CreateObject("WScript.Shell")
strFolder="d:1"
DoUntilobjFile.AtEndOfStream
strLine=objFile.ReadLine
filename=strLine
SetobjFile=objFSO.GetFile(filename)
setoShellLink=WshShell.CreateShortcut(strFolder&objFSO.GetBaseName(filename)&".lnk")
oShellLink.TargetPath=objFile
oShellLink.WindowStyle=1
oShellLink.WorkingDirectory=objFSO.GetParentFolderName(filename)
oShellLink.Save
Loop
objFile.Close
这个只传递一次就完了