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

12 Comments

  1. 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.

  2. 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