Jump to content

File in Use


Recommended Posts

Hi,

Does someone have a good idea to get me started?

I like to check a compiled script on our server if it is being used.

If so, some action

If not, some other action.

Is it even possible to see wich PC is using it?

Thanx in advance.

Link to comment
Share on other sites

you can use createfile api... search forum for "_realfileopen"... i helped someone check if a .wav file was open... as for who has it open... that is not researched by me...

<{POST_SNAPBACK}>

Wow, very usefull !!! :D

and so way beyond my capabilities..... :D

Well, the question WHO has it is an option which would be very cool but not nescesary.

Thanx Larry, I think this will save me lot's and lot's of time. :)

Link to comment
Share on other sites

Larry, can you please help me with this?

I altered the script you mentioned but something isn't right.

What am I doing wrong here?

I have:

While 1
   $a = _RealFileOpen($File)
   _RealFileClose($a)
   If $a <> "FFFFFFFF" Then ExitLoop
   Sleep(250)
WEnd

MsgBox(4096,"",$a)

Now I know the $file is in use but stil it exits the loop but shows "FFFFFFFF" in my MsgBox.

While as I use = instead of <> it keeps looping.

Also == exits the loop, but this should indeed be true.

Link to comment
Share on other sites

Larry, can you please help me with this?

I altered the script you mentioned but something isn't right.

What am I doing wrong here?

I have:

While 1
   $a = _RealFileOpen($File)
   _RealFileClose($a)
   If $a <> "FFFFFFFF" Then ExitLoop
   Sleep(250)
WEnd

MsgBox(4096,"",$a)
Would closing the file before asking for the result be the problem?

I believe in Larry's example, the test comes before the fileclose()

While 1
   $a = _RealFileOpen($File)
   If $a <> "FFFFFFFF" Then ExitLoop
   _RealFileClose($a)
   Sleep(250)
WEnd

MsgBox(4096,"",$a)

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...