Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Write directly to command line
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00757650
Message ID:
00757715
Views:
9
>>Sorry, I wasn't clear enough concerning command. I'm thinking of the DOS prompt. The program will be run from the DOS prompt in a batch file and I want it to be able to place a status message there if any problems or if completed.
>>If you use the run ! command, it tries to execute what is placed in the DOS prompt. I want a simple message to show there without "Bad command or filename" below it. (Actually, how do you put the "Bad command or filename" on the screen? Similar to that.)
>
>Use the DOS ECHO command in your batch file.
>
>ECHO Results were invalid!

To add to this:

Since the app will be executing from the batch file, the batch file window will be waiting on the line calling the app and not show any messages until it is finished/errored out. If you use RUN command from within application it will open another DOS window. To show the error message or some custom status messages in the same DOS window (like "XXXX records processed") after the app is done/errored out, you can output them from the app to the text file (say, "MYRESULTS.TXT") that may be shown with TYPE command right after the line calling your app.

REM Batch file calling the app
c:
cd\myappdir

REM run your application here with whatever options, for example:
myapp.exe

type myresults.txt
pause
REM end of batch file
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Reply
Map
View

Click here to load this message in the networking platform