1

I've got a RDS solution which utilizes User Profile Disks. There is a bug with UPD's which means that every now and then permissions on the users individual Recycle Bin's get mixed up and the user is then unable to delete items (they can still shift + delete).

This is happening more and more for this large customer of mine and the resolution is for me to open the users VHD and delete their $RECYCLE.BIN. It's automatically recreated at next logon with correct permissions.

To overcome this issue and save me a lot of time in the log run, I want to put a logoff script in place that deletes %USERPROFILE%\$RECYCLE.BIN, however I'm struggling to make this happen.

 del /f %USERPROFILE%\$RECYCLE.BIN

results in Could Not Find C:\Users\Administrator\$RECYCLE.BIN\*

I threw a trailing slash on the end of that also, but no difference.

Does anyone know how I can achieve this?

John
  • 541
  • 4
  • 17
  • 34

1 Answers1

2

Almost as soon as I posted this I found the answer...

del /f /Q /A:H %USERPROFILE%\$RECYCLE.BIN\

John
  • 541
  • 4
  • 17
  • 34