Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I want to call command prompt script in vb script.
For eg: We can place reload command in bat file and when we run bat file it will load the qv file.
Similar to that when I click the button I want to run command prompt code directlyI don't want to create bat file to run the command prompt code.
- I only don't want to run reload command.
- I want to run my own command prompt available, let say xcopy or copy, writing csv file. etc.
Thanks,
Jagan
I'm not sure if I tuly understand your requirement. Is your VBScript a stand-alone program, or is it embedded in a QVW document?
In VBScript, there is a WShell object that lets you execute DOS commands as if you opened a CMD window. Look around the internet for more information, there must be thousands of examples.
Best,
PEter
Google it, you would find examples like:
dim filesys
set filesys=CreateObject("Scripting.FileSystemObject")
If filesys.FileExists("c:\sourcefolder\anyfile.html") Then
filesys.CopyFile "c:\sourcefolder\anyfile.html", "c:\destfolder\"
End If
Hi,
I want to run,
the below command
curl -u username:Test@345 -F "token_id=918080a1-cabb-45fa-8aee-ee496fa896bb" http://demo.XXXXX.com/rest-api/v1/getPredictions/?format=json
Use something like:
Set oShell = WScript.CreateObject("WSCript.shell")
oShell.run "curl -u username:Test@345 -F " & chr(34) &
"token_id=918080a1-cabb-45fa-8aee-ee496fa896bb" & chr(34) &
" http://demo.XXXXX.com/rest-api/v1/getPredictions/?format=json"
Hi Peter Cammaert,
It gives syntax error.
Thanks,
Jagan
Where?