Because your computer is attached to a domain, some of your files are actually stored on a file server for that domain. For efficiency's sake, copies of those files are replicated to your local computer. You can add or change those files locally, and the next time your computer is attached to the corporate network, all changes made locally are copied to the file server (and vice versa, if applicable).
Check out the following steps. You will likely have to do additional research, but this framework should be something to start with.
STANDARD DISCLAIMER: Some of the below steps have the potential to really mess you over, like lose all of your valuable files and make the planet spin backwards. So I'm telling you the same tired but appropriate advice about backing up your computer and, ultimately, being prepared to reload Windows if you mess it up bad. But you've heard all this before.
You will need to know how to log on to your computer as the affected user as well as an Administrator. If you can't get on as Administrator, using
cmd in Safe Mode might do it. If Administrator is merely disabled, I'm thinking maybe you could get into Safe Mode and use:
net user administrator /active:yes
net user administrator password
to enable the Administrator login and assign the password as
password so you won't have to use Safe Mode. I've used those commands, but not from Safe Mode, so maybe they won't work there.
If you know how to boot from a rescue disk, Linux, or a Windows boot disc, then you can use that instead of using the Administrator login when deleting files. Depending on how you use it and what you do, you'd be able to bypass step 5 and could perhaps do 6B without a lot of fuss. A lot of the problems are simply having to get past Windows security.
When "show hidden files" was turned on in File Explorer, there were TWO recycle bins, one real, the other a "ghost" (the "ghost" one was marked hidden, which is why it was a ghost). There were multiple permissions problems, and the user couldn't recycle any files, although using shift-delete would work to actually delete the file. Clearly, the recycle bin had problems.
To fix it all:
1. As the affected user, turn off the "real" recycle bin. (right-click) Recycle Bin -> Properties. For all of the listed
Locations, change the function to immediate delete instead of recycle.
2. As the affected user, eliminate the Recycle Bin icon. (Right-Click) Desktop -> Personalize [-> Themes] -> Desktop Icons, uncheck Recycle Bin.
After the above two steps, you will have only the "ghost" recycle bin remaining. If you now choose "delete" from the File Explorer context menu for a file, it will actually delete the file.
3. As Administrator, search the C:\Users\
username folder for any $RECYCLE.BIN and delete them all. Due to the CSC (see below), you likely won't see them all. Note, you can't be logged in as the affected user!
4. Log on to the file server and delete all $RECYCLE.BIN from that user's profile. Obviously, if you're not a domain administrator, then you won't be able to do this, the best you can do would be to fix everything locally and hope errors won't replicate back. Otherwise you may need to get your corporate admins involved.
5. IF YOU HAVE PERMISSIONS PROBLEMS on any of this, you may need to run these as Administrator:
takeown /F "Full Path of Folder or File"
takeown /F "Full Path of Folder or File" /r /d y
icacls "Full Path of Folder or File" /grant Administrators:F
icacls "Full Path of Folder or File" /grant Administrators:F /t
I did a CD to the containing directory and just used $RECYCLE.BIN instead of the
"full path of folder or file".
I also added " Everyone:F" after "Administrators:F", just to make sure anyone could do anything -- I.e., so that security wouldn't be a problem. NOTE THAT USING Everyone:F MEANS THAT ALL USERS AND ANY PROGRAM WILL HAVE COMPLETE ACCESS TO YOUR USER FILES ON YOUR SYSTEM. So don't use it if you don't need to.
6. Unfortunately, there's another wrinkle, and that's the CSC, which is also in the mix. So if things still act wonky, you may need to go into the CSC and delete $RECYCLE.BIN as appropriate. Even more unfortunate is that CSC is heavily protected because Microsoft didn't want people futzing with it.
Your choice is either (B) to go in there manually and edit it (heavens to Betsy!), or (A) to re-initialize the CSC and letting the system re-establish it.
A. Re-initialize via adding Registry string (the following is on a single line):
REG ADD "HKLM\System\CurrentControlSet\Services\CSC\Parameters" /v FormatDatabase /t REG_DWORD /d 1 /f
You could also manually use regedit to add this entry to the registry.
This will delete all files in the CSC on the machine and will re-initialize it from the server when sync'ed again. If there was a sync error between the server and local copy, too bad, since the local copy will be erased.
This means that if you've made local changes to files that haven't been copied to the file server, you will lose those changes! So make sure you don't have any outstanding sync errors. I cannot stress firmly enough the ugly consequences of not ensuring local files sync'ed correctly to the file server!
IIRC, reinitializing the CSC affects ALL the users on that machine -- so everyone needs to be sync'ed OK or there could be data loss. If it's a personal machine, then it's just you that you need to care about.
B. The CSC structure looks like:
C:\Windows\CSC\v2.0.6\namespace\Files\Users\
username
and is protected (even from Administrators!) from the top of the hierarchy. You'll have to use the above
takeown, etc commands to get access to it. It's protected because screwing with it can lead to inconsistency in files between the file server and the user's visible profile. The CSC is essentially what the user maps to locally when he sees his files.
Note that using the above commands to make the CSC visible
potentially reduces the security and integrity of your system because this area now becomes available to unauthorized change. At the same time, since it's your files anyway, any malicious actor could just use "normal" methods to change stuff. I.e., I don't see it as a big deal if you're the only user of the computer.
Nevertheless, (A) is preferable to (B) **IF** you can ensure you're sync'ed correctly with the file server. If you've been away from the file server for a while and done work and need to fix this, you SURELY WON'T want to do (A)!
As Administrator, search the relevant
username in the CSC for any $RECYCLE.BIN and delete them all.
7. After ALL the $RECYCLE.BIN is deleted from all the directories in the affected user's file hierarchy, then you can go back as that user and re-enable the icon then re-enable the Recycle Bin wherever you need. If you've used (A) to delete the CSC, you'll need to connect to the corporate network to get your files copied back when you login and sync.
I had this problem ALMOST licked early on -- the only problem was that there was always a "ghost" icon (because it had the "hidden" attribute) on the desktop that got recreated quickly after being deleted from the Desktop. Everything else worked OK, it's just that there were two Recycle icons, the real one (which was solid and could be removed by step 1, above), and the "ghost" one, which always magically came back. I deleted it from the Desktop multiple times, and from the file server as well (sometimes it didn't even show on the file server, sometimes it did). I was NOT satisfied with merely turning off the display of hidden files because I KNEW that thing was still there.
The solution FINALLY was to go into the CSC as documented above and delete it.
In retrospect, it makes sense, since if it was in the CSC, it would show back on the visible Desktop as well as replicate to the server at whatever times these would refresh.
Hope this helps a bit. I had to do about 5 hours' work and lots of Googling to get this. Plus all the time to write it up. <sigh>