+ Reply to Thread
Results 1 to 8 of 8

Thread: Shapefile lock problems

  1. #1
    Mark Chilcott
    Join Date
    May 2010
    Posts
    32
    Points
    3
    Answers Provided
    0


    0

    Default Shapefile lock problems

    Hi peoples,

    In ArcGIS 10, I note that if you use ArcCatalog to preview a shapefile, a lock file is written into the folder where the shapefile exists.

    The problem is, that if you now try to copy the folder using Windows Explorer, an error pops up "Error copying file or folder" - Cannot copy <filename>: it is being used by another person or program. Close any programs that might be using the file and try again.

    This is going to cause us major issues with shapefiles on network drives where multiple people are viewing and copying.

    Has anyone else seen this ?
    Mark Chilcott
    Senior GIS Analyst

  2. #2
    Dan Patterson

    Join Date
    Apr 2010
    Posts
    1,756
    Points
    442
    Answers Provided
    41


    0

    Default Re: Shapefile lock problems

    In short, don't use arccatalog and see if the problem goes away I use Explorer exclusively and don't get file locks
    Geomatics, Carleton University, Ottawa, Canada
    http://obidangis.blogspot.ca/

  3. #3
    Mark Chilcott
    Join Date
    May 2010
    Posts
    32
    Points
    3
    Answers Provided
    0


    0

    Default Re: Shapefile lock problems

    ArcMap and ArcCatalog create the lock files.

    Say for example you have many shapefiles in a folder. If you try to copy the folder, the entire copy will fail. This means that if anyone is viewing the shapefile in the directory, it makes things very awkward to copy - especially with network drives and multi user environments.

    Where we have directory structures with many folders, and many shapefiles in each of the folders, if we try to copy the folder hierarchy, this bug will effectively mean we have to ask every user to stop using ArcMap and ArcCatalog so that we can do the copy.

    This is a real show stopper for us.

    (Should mention we are using WinXP)
    Mark Chilcott
    Senior GIS Analyst

  4. #4
    Mark Chilcott
    Join Date
    May 2010
    Posts
    32
    Points
    3
    Answers Provided
    0


    0

    Default Re: Shapefile lock problems

    What I may not have made clear is that ESRI physically place a file named .lock in the folder.

    If you are looking at the folder in windows explorer, you see the file created as soon as you preview the shapefile in ArcCatalog. When you exit ArcCatalog, the .lock is removed.

    It is the physical creation of the .lock file that is the problem.
    Mark Chilcott
    Senior GIS Analyst

  5. #5
    Tom M
    Join Date
    Apr 2010
    Posts
    285
    Points
    12
    Answers Provided
    1


    0

    Default Re: Shapefile lock problems

    This is yet another minor problem with 10 that is giving us headaches. I had hoped service pack one would have fixed this. If someone is using ArcMap, ArcCatalog or even ArcReader it creates locks on shapefiles and geodatabases. Now we cannot copy them to back them up or create a working copy. It worked fine in 9.3.1.

  6. #6
    Tom M
    Join Date
    Apr 2010
    Posts
    285
    Points
    12
    Answers Provided
    1


    0

    Default Re: Shapefile lock problems

    The conspiratorial side of my brain says this is an underhanded way of making people see the advantages of using ArcGISserver.

  7. #7
    Melita Kennedy

    Join Date
    Nov 2009
    Posts
    1,803
    Points
    513
    Answers Provided
    74


    0

    Default Re: Shapefile lock problems

    Quote Originally Posted by Tomsriv View Post
    The conspiratorial side of my brain says this is an underhanded way of making people see the advantages of using ArcGISserver.
    It looks like this is now as-designed:

    http://resources.arcgis.com/content/...leShow&d=38493

    (Please don't blame the messenger!)

    Melita
    Melita Kennedy
    Sr. Esri Product Engineer

  8. #8
    Suzanne Monette
    Join Date
    Oct 2010
    Posts
    23
    Points
    0
    Answers Provided
    0


    0

    Default Re: Shapefile lock problems

    Hi Everyone,

    Does anyone know of a work around for this incredibly annoying flaw in ArcGIS 10? I lose track of how many times in a day I have to shut down and restart ArcMap (which is no small feat for the beast ArcGIS 10 is) just so I can delete shapefiles that are no longer open in ArcMap but are locked up because of these silly lock files. I'm not a programmer but was there no other way that this could have been handled? With everything that software can do nowadays is there not some way to simply remove a lock file once the file is no longer opened?

    Back to my first question, is there a work around for this?

    Sue

+ Reply to Thread

Posting Permissions

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