Consultor Eletrônico



Kbase 19597: How to use a batch file to automate overwrite prompt
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   14/03/2000
This kbase is being generated to assist customers with generating batch scripts which allow you to automate the overwrite prompt message some of our routines issue. A batch file is a job you want to run in batch mode without user input. This kbase is designed to assist you in working around issues where a command you are invoking is requiring additional input.

The information below can be expanded to meet other non-Progress needs as it is a scripting issue not a Progress one.

Example: procopy a db to another location and overwrite pre-existing
one which resides in the target location.

You can accomplish this task by creating a file called yes.txt or no.txt. The file should contain either a y or n depending upon how you wish to respond to the prompt. Then create a batch file which will issue the command you are interested in performing. The command in the batch job should receive input from the appropriate .txt file you created above.

Example: yes.txt (contains y)
copyit.bat (contains procopy db1 db2 < yes.txt)

When this script is invoked, the y will be automatically
passed to the procopy command when it invokes the overwrite
prompt.