Windows 7 locks a file from being edited or deleted.


  1. Posts : 7
    Windows 7 Professional 32bit
       #1

    Windows 7 locks a file from being edited or deleted.


    I am running Windows 7 and using the 7-Zip application to edit, add new, and delete existing files in an epub archive. I can overwrite a one file in the archive one time with no problems. If I try to delete or modify the same file within the archive a second time, Windows locks the entire archive and does not allow any changes to be made to the archive. 7-Zip gives the prompt, "Cannot create a file when that file already exists." I thought initially this was a 7-Zip error, but have closed the 7-Zip application and any 7-Zip processes running in the task manager. I have tried taking Administrator ownership of the document. No other process is accessing the file, only the windows os. Only after a log out or a restart of Windows is the archive accessible again. It also creates a random file name with a .tmp extention. After the log out or restart, I have to change the name and extension of the .tmp file to its original name and .epub extension. It is rather frustrating being able to modify a file only one time before I have to log out and the log back in to make further changes. This never happened when working with windows XP. Any help would be greatly appreciated.

    Thanks,
    --christopher
      My Computer


  2. Posts : 1,519
    Windows 7 Ultimate 64-bit, Windows 8.1 64-bit, Mac OS X 10.10, Linux Mint 17, Windows 10 Pro TP
       #2

    But were you using 7-Zip on your WinXP to do the same thing? Have you tried turning off UAC/User Account Control in Control Panel, User Accounts?
      My Computer


  3. Posts : 4,566
    Windows 10 Pro
       #3

    DO NOT DISABLE UAC.

    It is a very important part of the security for windows 7. Turning it off almost brings the security level to xp.

    What version of 7 zip are you using? Stable or beta?

    Where are you saving the file (archive) with 7 zip?
      My Computer


  4. Posts : 5,642
    Windows 10 Pro (x64)
       #4

    What security software are you running? These types of problems are common with real time anti virus scanners.
      My Computer


  5. Posts : 7
    Windows 7 Professional 32bit
    Thread Starter
       #5

    Thank you all for your replies. I am currently using the 32bit 7 Zip version 9.2.0
    I had AVG installed, but have temporarily removed it to see if it is the culprit. I have encountered this issue both when I edit the files within the archive directly by using notepad2 and then saving directly back into the archive. I also encounter the issue when I copy the file out of the archive make changes and then copy the file back into the archive. Either way, the file is essentially overwritten and can only be modified once before the archive becomes locked. The archive is in my documents folder. The epub file is basically a collection of compressed html files with a few other text files. In the design process as well as in adding the interactivity through javascript, it requires the html files to be edited many times over before ending at a final state.
    I do have the UAC on, but had it on with XP.
      My Computer


  6. Posts : 4,566
    Windows 10 Pro
       #6

    UAC does not come with windows XP.

    User account control began with vista.

    You state it is in your documents folder.

    Have you taken ownership of the documents folder where the archive is stored to see if that fixed it?

    Did you copy your documents from xp to an external hard drive, then install 7 and then copy the data back over? If so the permissions might be messed up.

    Take Ownership - Allow or Prevent Users and Groups To

    Take Ownership Shortcut

    What is user account control (UAC)?

    What are User Account Control settings?
      My Computer


  7. Posts : 7
    Windows 7 Professional 32bit
    Thread Starter
       #7

    I have tried the suggestions above and am still having this issue happen. I can only modify a file within the archive one time. If I try to modify or overwrite a file a 2nd time, the entire archive becomes locked.
      My Computer


  8. Posts : 7
    Windows 7 Professional 32bit
    Thread Starter
       #8

    This is driving me absolutely crazy. When the file becomes locked, I cannot regain ownership of the file. I cannot open it, nor can I modify or delete it. I am the only user and have administrator privileges. Why is the file getting locked? I'll try anything.
    Is there some registry setting I need to add or modify so this file does not get locked?
      My Computer


  9. Posts : 4
    Win 7 HP 64bit
       #9

    There is a registry hack called "Take Ownership". It puts an entry into the right click context menu. It is extremely useful and is one of the first things I put on a new installation. It can be found here Add "Take Ownership" to Explorer Right-Click Menu in Win 7, 8 or Vista. It might assist you in retaining ownership of the files.
      My Computer


  10. Posts : 7
    Windows 7 Professional 32bit
    Thread Starter
       #10

    Steve, I already have that right click menu option. So far it does nothing to unlock the file. Does your link change this functionality?

    I think I may have found the culprit. It may be internet explorer. It only happens after I send the file in email after I attach it in ie. I think ie locks the file from being edited or deleted.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 07:20.
Find Us