我有 4 个 .vbs 文件,例如 A.VbS、B.VBS、C.VBS、D.VBS。我想按以下顺序调用它们:
(1)A.VBS
(2)B.VBS
(3)C.VBS
(4)D.VBS
第一个完成后,第二个应该自动启动,依此类推。
你能帮我做这些任务吗?
编辑:
Option Explicit
Dim oShell : Set oShell = WScript.CreateObject ("WScript.Shell")
Dim FSO : set FSO = CreateObject("Scripting.FileSystemObject")
Dim Path
REM oShell.run "ParentChildLinkFinal.vbs", 1, True
REM oShell.run "Parent_Child_Merge_final.vbs", 1, True
REM oShell.run "Baddata.vbs", 1, True
REM oShell.run "CycleTime.vbs", 1, True
msgBox(oShell.CurrentDirectory)
MsgBox(FSO.GetFile(Wscript.ScriptFullName).ParentFolder )
Path=FSO.GetFile(Wscript.ScriptFullName).ParentFolder
oShell.run Path\ParentChildLinkFinal.vbs, 1, True
oShell.run Path\Parent_Child_Merge_final.vbs, 1, True
oShell.run Path\Baddata.vbs, 1, True
oShell.run Path\CycleTime.vbs, 1, True
我收到以下错误:
变量未定义:“arentChildLinkFinal.vbs”
解决方法是什么?