首页 电脑 电脑学堂 查看内容

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

2009-9-28 16:25 691 0

摘要:   用vbs实现循环产生参数的传递问题,建议大家测试学习   Set objFSO = CreateObject("Scripting.FileSystemObject")   Set objFi...

  用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   这个只传递一次就完了
声明:文章版权归原作者所有 部分文章转自互联网 如有侵权请联系 [邮箱地址] 删除

路过

雷人

握手

鲜花

鸡蛋

最新评论

返回顶部