Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Capture ErrorLevel from batch file
Message
From
27/11/2013 03:14:52
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
27/11/2013 00:03:24
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01588722
Message ID:
01588731
Views:
44
>When calling a batch file from the RUN command within VFP(7), is there a way to capture the %errorlevel% once returning to the calling VFP program?

You can add a line like this to the end of the batch:
echo %errorlevel% >status.txt
You could then just have
lcExitStatus=filetostr("status.txt")
and you'd have it as a string in lcExitStatus.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform