当前位置: 首页 > 图文教程 > 脚本技术 > VBScript > vbs循环产生的参数的传递问题

VBScript
VBS教程:对象-正则表达式(RegExp)对象
VBS教程:对象-Matches 集合
VBS教程:对象-Match 对象
VBS教程:对象-Err
VBS教程:对象-Class 对象
VBS教程:VBScript 对象
VBS教程:字符集 (0 - 127)
VBS教程:方法-Test 方法
VBS教程:方法-Replace 方法
VBS教程:方法-Raise 方法
VBS教程:方法-Execute 方法
VBS教程:方法-Clear 方法
VBS教程:函数-Year 函数
VBS教程:函数-WeekDayName 函数
VBS教程:函数-Weekday 函数
VBS教程:函数-VarType 函数
VBS教程:函数-UCase 函数
VBS教程:函数-UBound 函数
VBS教程:函数-TypeName 函数
VBS教程:函数-TimeValue

VBScript 中的 vbs循环产生的参数的传递问题


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-11   浏览: 93 ::
收藏到网摘: n/a

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
这个只传递一次就完了