Results 1 to 3 of 3

Thread: Detect if A file is in use

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 2007
    Posts
    38

    Detect if A file is in use

    On my network multiple people will be accessing the same file daily. I wanted to know if there is a way with code to detect if the file is in use.

  2. #2
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    Re: Detect if A file is in use

    Access for reading or writing? If for reading it doesn't matter. If for writing, open the file for writing and trap the error. How you do that depends on the language the code is written in.
    The most difficult part of developing a program is understanding the problem.
    The second most difficult part is deciding how you're going to solve the problem.
    Actually writing the program (translating your solution into some computer language) is the easiest part.

    Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.

    Please Help Us To Save Ana

  3. #3
    Hyperactive Member
    Join Date
    Jun 2006
    Posts
    372

    Re: Detect if A file is in use

    try renaming the file.
    if you can, it's not busy, so rename it back.

    in a winnt environ, you can also use the openfiles command at the command line.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width