Sign in to follow this  
Followers 0
Guest seal

Need help on scripting

3 posts in this topic

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



#2 ·  Posted (edited)

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  
Followers 0