Jump to content
Sign in to follow this  
Guest seal

Need help on scripting

Recommended Posts

Guest seal

Hi !

I've got this line of command and I don't know why the file 'Results.txt' isn't created :whistle: :

RunWait('sqlplus.exe "USER/PWD@INST as SYSDBA" "@Myscript.sql" > "Results.txt"',"",@SW_MAXIMIZE)

If I try to test this line of command in a DOS windows, the file is created perfectly.

Can anyone try to help me please ?

Share this post

Link to post
Share on other sites

Redirecting output of a program to a file (>) requires a DOS instance to be called. Try using this:

$cmd = 'sqlplus.exe "USER/PWD@INST as sysDBA" "@MyScript.sql" > "Results.txt"'
runWait(@comSpec & " /c " & $cmd, "", @SW_MAXIMIZE)

P.S. Welcome to the forums! :whistle:

Edited by LxP

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.