Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do i check whether a program is running in Visual Fox Pro

Status
Not open for further replies.

speedster

Programmer
Jan 21, 2003
7
US
I need to check whether a program is running before i can overwrite the file.
 
HI
Read my FAQ on this
How to ensure that only one instance of my application is running in my desktop.
faq184-839
:) ramani :)
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
 
speedster

Your question :-

"I need to check whether a program is running before i can overwrite the file"

is not very explicit.

If you are referring to a VFP application, then ramani's FAQ will give you a solution - if not, please give sufficient information in your question for someone to be able to present you with an appropriate answer. HTH

Chris [pc2]
 
You could simply try something like this:
[tt]
cSaveError=ON("ERROR")
lError=.F.
ON ERROR lError=.T.
COPY FILE myExe.exe TO \LIVE\myExe.EXE
ON ERROR &cSaveError
IF lError
&& File copy failed...probably was in use
ELSE
&& File copy succeeded, couldn't have been in use
ENDIF
[/tt]
Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top