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:

%USERPROFILE%\AppData\Local\Temp

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.


Email SubscriptionPrefer an E-mail subscription?

Enter your email address:

Delivered by FeedBurner

18 Comments

  1. Phil
    said this on Tuesday, December 16th 2014 10:56 am

    Superb, thank you!

    I bow to your detailed knowledge Sir!

  2. Jake
    said this on Sunday, October 26th 2014 2:44 am

    How do I reset this back to the way it was before I typed these commands in? I can’t save to the desktop… this is bad. Oh boy…

  3. Todd
    said this on Friday, August 22nd 2014 5:17 am

    THANK YOU! This is the only place I could find a solution to this irritating issue. I had to run the icacls commands and voila, it now works.

    THANKS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  4. said this on Friday, July 18th 2014 11:08 pm

    This worked like a charm, once I figured out how to open an “elevated Command Prompt”! thanks so much for the instructions–why something as simply as zipping a file should be so complicated, no idea, nor why I, the sole owner of the computer and software should not automatically have full permission to everything–incomprehensible. Thanks again!

  5. Ainede
    said this on Friday, May 23rd 2014 7:17 pm

    You are awesome. After going through forum after forum and trying multiple fixes unsuccessfully without finding a solution to the problem. This right here is the only solution that works. Great that someone actually found a fix for this error. Thank you so much.

  6. Michelle
    said this on Wednesday, May 14th 2014 3:32 am

    YAAAAAAAAAAAAAAYYYYYYYYYYYYYYY!!!!!!! Thank you!

  7. Krystle
    said this on Monday, March 17th 2014 7:29 pm

    I had the same problem. Nothing fixed it… Until I did the last step you suggested
    THEN IT WORKED!!!! PS. spaces are important for this to work.

  8. Isabel
    said this on Wednesday, February 19th 2014 8:34 pm

    I did not have any of the two problems above (temp was written in correctly, and I was able to create a file in the temp folder), but I still get the same error message.

Leave a Reply