Jump to content

Recommended Posts

Posted

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 ?

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

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...