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.

Email SubscriptionPrefer an E-mail subscription?

Enter your email address:

Delivered by FeedBurner


  1. Beck
    said this on Saturday, February 7th 2015 5:52 pm

    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