vbs循环产生的参数的传递问题
时间:2021-06-24 08:17:17|栏目:VBS|点击: 次
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("d:\1\0.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
这个只传递一次就完了
Set objFile = objFSO.OpenTextFile("d:\1\0.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
这个只传递一次就完了
上一篇:用vbs实现修改dns的网关脚本
栏 目:VBS
下一篇:用VBS控制鼠标的实现代码(获取鼠标坐标、鼠标移动、鼠标单击、鼠标双击、鼠标右击)
本文标题:vbs循环产生的参数的传递问题
本文地址:http://www.codeinn.net/misctech/147009.html