Link to home
Start Free TrialLog in
Avatar of DarthRater
DarthRater

asked on

Deleting Folders By Group Policy Preference

I have been charged with locking down an envirnoment and the first steps is to delete all data in a users Desktop and Documents. I have created a GPP that works great with XP,

User Configuration>Preferences>Windows Settings>Folders

Delete %USERPROFILE%\Desktop\ and %USERPROFILE%/My Documents. The GPP correctly nukes all folders.

MY issue is with Win 7. The Desktop Variable works fine, but the %USERPROFILE%\Documents fails with an event log error.

The user 'Win7 Documents' preference item in the 'Restriction: Delete Contents of Desk/Docs {8EF922B8-1AF0-44BB-9305-E375F0485DD8}' Group Policy object did not apply because it failed with error code '0x80070091 The directory is not empty.'

I have all the options checked so it shouldn't matter if the destination is empty. On XP it kills everything in the target folder.
Avatar of motnahp00
motnahp00
Flag of United States of America image

Did you specify the other Delete options in your delete preference?
Avatar of wbsn
wbsn

There may be an issue with the drive. Try CHKDSK /F in the Start Search box and press Enter.
 
Note: If the folder you are trying to delete is located on a drive that is not your C: drive, add the drive letter to the end of the command. Example: CHKDSK /F E:

If you get an error after running, reboot and to let the scan run. Try to delete again.

HTH
Avatar of DarthRater

ASKER

@motnahp00

"I have all the options checked so it shouldn't matter if the destination is empty. On XP it kills everything in the target folder."

@wbsn
No. That is not part of the problem.
ASKER CERTIFIED SOLUTION
Avatar of motnahp00
motnahp00
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Interesting. I'll give that a shot and report back, thank you.
Trying to think outside the box. I'm still wondering why your GPO didn't work.
Yea me too, considering it works very well on XP.
Maybe this will help. I'm headed to sleep in a bit. I'll follow up with you tomorrow morning.