Forum Discussion
joffre
15 years agoRegular Contributor
Here I am Robert.
I tried this way:
Function LGComponentes
Dim ShellObj
Set ShellObj = Sys.OleObject("WScript.Shell")
Call ShellObj.Run(ComandoCriarTabela & "1.LGComponentes\SQLServer\1.sql -o " &DirLog&"1.txt" & true)
End Function
And on my SUB I called the Function like this:
Call LGComponentes
And it returned the errors that I've attached.
On "erro1.jpg", it says that 'the system couldn't find the file'.
On "erro2.jpg", it says the same as on erro1.jpg.
Hope you can help me, and sorry about my lack of knowledge.
Here is my entire code. I underlined the Call.
I tried this way:
Function LGComponentes
Dim ShellObj
Set ShellObj = Sys.OleObject("WScript.Shell")
Call ShellObj.Run(ComandoCriarTabela & "1.LGComponentes\SQLServer\1.sql -o " &DirLog&"1.txt" & true)
End Function
And on my SUB I called the Function like this:
Call LGComponentes
And it returned the errors that I've attached.
On "erro1.jpg", it says that 'the system couldn't find the file'.
On "erro2.jpg", it says the same as on erro1.jpg.
Hope you can help me, and sorry about my lack of knowledge.
Here is my entire code. I underlined the Call.
Call directUIHWND.Keys("01 - LGComponentes[F2]1.LGComponentes[Enter][Enter]")
'I rename the folder
Call directUIHWND.Keys(CaminhoDaPasta3) 'I join the folder where the sql file is
Call directUIHWND.Keys("Like %1%[F2]1.sql[Enter][BS]") 'I rename the sql file
Call LGComponentes
Call directUIHWND.Keys(CaminhoDaPasta4)
Call directUIHWND.Keys("1.LGComponentes[Down]")
Log.Message("Folder renamed and script executed!")