Please help me with this interactive batch program

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Elomelo
Posts: 4
Joined: 03 Aug 2013 15:13

Please help me with this interactive batch program

#1 Post by Elomelo » 24 Aug 2013 15:06

Dear Sir,
I have again and again tried to make this batch file. But every attempt ended in smoking! Please someone give me a solution.

I want to export oracle database dump file with some dos commands. Here I am describing the process step by step:

In command prompt window, I will write:
exp
In a couple of seconds the command prompt will return the reply:
Username:
I will write:
alpha
In a couple of seconds the command prompt will return the reply:
Password:
I will write:
alpha
In a couple of seconds the command prompt will return the reply:
Buffer Size:4906>
I will just press [ENTER]
.......... and so on..

How this program can be written could you please tell me? Every time after giving the input I must wait for the reply to provide next input.

Thanking in advance.

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Please help me with this interactive batch program

#2 Post by foxidrive » 25 Aug 2013 03:09

There is a command line for querying an sql database. See https://www.google.com.au/search?hl=en& ... l+database

Another tool you can script to control a gui is AutoIt

aGerman
Expert
Posts: 4743
Joined: 22 Jan 2010 18:01
Location: Germany

Re: Please help me with this interactive batch program

#3 Post by aGerman » 25 Aug 2013 03:48

I think that's what you're looking for: http://docs.oracle.com/cd/B10501_01/server.920/a96652/ch01.htm#1004778
As you can see you can write all in one command line or you could use a parameter file.

Regards
aGerman

Elomelo
Posts: 4
Joined: 03 Aug 2013 15:13

Re: Please help me with this interactive batch program

#4 Post by Elomelo » 25 Aug 2013 06:07

foxidrive wrote:There is a command line for querying an sql database. See https://www.google.com.au/search?hl=en& ... l+database

Another tool you can script to control a gui is AutoIt


Sorry sir, this search could not provide me with any solution. Thanks anyway.

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Please help me with this interactive batch program

#5 Post by foxidrive » 25 Aug 2013 07:30

Elomelo wrote:Sorry sir, this search could not provide me with any solution. Thanks anyway.


I don't believe that there was no information about producing queries from the command line. :)

Elomelo
Posts: 4
Joined: 03 Aug 2013 15:13

Re: Please help me with this interactive batch program

#6 Post by Elomelo » 25 Aug 2013 07:34

aGerman wrote:I think that's what you're looking for: http://docs.oracle.com/cd/B10501_01/server.920/a96652/ch01.htm#1004778
As you can see you can write all in one command line or you could use a parameter file.

Regards
aGerman


Dear aGerman,
I believe just a batch program will solve this problem which I myself cannot write.
Because I do not know how to wait for a response from DOS before giving the next input as "echo" in the command line, I do not know what I should write when I need to press just the ENTER key.

Could you please help me in this regard?
Thanks in advance.

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Please help me with this interactive batch program

#7 Post by foxidrive » 25 Aug 2013 07:50

Elomelo wrote:I believe just a batch program will solve this problem which I myself cannot write.
Because I do not know how to wait for a response from DOS before giving the next input as "echo" in the command line, I do not know what I should write when I need to press just the ENTER key.


A batch file can help you use the command line version of a SQL query.

You are asking how to control a GUI program, and in most cases with modern programs that is not achievable with a batch file.
AutoIt is a scripting tool to control a GUI. SENDKEYS can control a GUI, but is not as reliable.

We don't have your program to test - and we don't even know its name.

Elomelo
Posts: 4
Joined: 03 Aug 2013 15:13

Re: Please help me with this interactive batch program

#8 Post by Elomelo » 25 Aug 2013 08:08

foxidrive wrote:
Elomelo wrote:Sorry sir, this search could not provide me with any solution. Thanks anyway.


I don't believe that there was no information about producing queries from the command line. :)


Sorry! Failure to understand the theme of your reply is my fault. Sorry again and thanks for your reply.

Post Reply