Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can FoxDos 2.6 set DOS ErrorLevel?
Message
 
To
15/06/1998 10:31:55
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
00108223
Message ID:
00108230
Views:
43
If you are looking for simple results, you may want to set a DOS variable in your autoexec.bat file, then, instead of calling the DOS program directly, you can call it via a .bat file and set the DOS variable = DOS error level. Then back in FoxPro, you can use GETENV() function. I'm not positive, but I believe Foxpro DOS does have this function.

Ex: In autoexec.bat, just to establish DOS variable
(if not created at AUTOEXEC, or anytime before the Foxpro session starts,
it won't see the variable created through the RUN command)
DOS2FoxError = 0

Ex: Batch file to call DOS program and store error

DOS2FoxError = ErrorLevel

Then in Foxpro,
lnDOSError = GetEnv( "DOS2FoxError" )
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform