Fix Compressed (Zipped) Folder Access Denied Error “Unable to Complete the Operation”

When you try to create a Compressed (zipped) folder in Windows 7/Vista, the error "Unable to complete the operation. Access is denied" may occur and the zip file is not created.

This happens is the user %TEMP% variable isn’t properly set, or the user has no "write" access to their %TEMP% folder. To fix the problem, use these steps.

1. Right-click Computer, click Properties

2. Click Advanced System Settings

(Alternately you can launch this page directly by running systempropertiesadvanced.exe)


3. Click Environment Variables

4. In the User variables for <username>, select TEMP and click Edit…

(In case the TEMP variable is missing, you’ll have to create one by clicking the New… button.)

5. Verify that the variable value is set as:


6. Click OK.

7. Logoff and Login back to your user account.

If the variable values are correctly set and the problem still persists, verify if the user account has Full Control permissions for the user TEMP folder.

Verifying and Fixing Permissions for the %TEMP% Folder

Click Start, type %TEMP% and press {ENTER}

This opens the TEMP folder of your user account. Try creating a test file in that folder, and delete it. If you’re unable to create a test file in that folder due to insufficient access, taking ownership and assigning Full Control permissions to the folder should resolve the problem. Use these steps:

1. Open an elevated Command Prompt, click Start, click All Programs, click Accessories, right-click Command Prompt, and then click Run as administrator.

2. Type the following command and press {ENTER}

takeown /f %TEMP% /r /d y

3. Then, type these commands one by one and press {ENTER} after each command:

icacls %TEMP% /grant SYSTEM:F /T
icacls %TEMP% /grant {username}:F /T

Replace "{username} with the actual user account name, such as:

icacls %TEMP% /grant John:F /T

… where John is the user name

Editor’s note: For more information on Taking Ownership and Assigning Permissions, see our earlier article How to Take Ownership of a file or folder using command-line in Windows 7 and Vista.

29 thoughts on “Fix Compressed (Zipped) Folder Access Denied Error “Unable to Complete the Operation”

  1. Worked like a charm – Thanks!. What I don’t understand is why I needed to do this. I was able to use the command a month ago but it would not work for me today. Who changed my system? Was this a “Microsoft update” induced error?

  2. WOW Thank you. It worked – I had the temporary file correct so I did the takeown /f %TEMP% /r /d y and all of the other commands and now I can make zip files.
    Thank you!!

  3. So glad to use this. I was becoming frustrated. The steps worked for me. Just put the spaces and colons as seen. Thank you.

  4. An easier way for me to get permission to access temp than the last three steps was to right click on the Temp folder, click properties, click the Security tab, then add my user name to the permissions section at the top.

  5. Thank you! I was like Faye too! Everything was fine, still did the steps 1-3 and it worked! Thank you so much. I was so frustrated!

  6. In my case, I had added new path to PATH variable but forgot the trailing ; (semicolon) and that was causing this problem, so check your PATH environment variable too, in fact that might be more likely suspect then TEMP.

  7. Yeah!! The last step working brilliantly! Agreed with Krystle that it’s important to put the spaces in to get the commands to work. Thank you! So rewarding.

Leave a Reply