newpersn Posted October 13, 2017 Posted October 13, 2017 Got an odd one here. Looking in users areas (Mapped to the file server) there is a folder called $Recyle.Bin in each area and has files starting with $..... What can i do with these? Can i stop it and delete them?
Steve21 Posted October 13, 2017 Posted October 13, 2017 That's the hidden folder for where recycled stuff goes Assuming you have the C access disabled. You can disable recycle bin fully, or did you want it on just not the folder? Steve 1
newpersn Posted October 13, 2017 Author Posted October 13, 2017 That's the hidden folder for where recycled stuff goes Assuming you have the C access disabled. You can disable recycle bin fully, or did you want it on just not the folder? Steve Would it be safe to delete the contents of the folder? Some have got more than a few Gigs in them...
Steve21 Posted October 13, 2017 Posted October 13, 2017 Safe in the sense it'll allow you, but obviously it'll remove any option for them to restore it if they wanted to as effectively that'll purge the contents, but unless you stop them using recycle bins it'll rewrite new stuff when they delete it don't forget Steve 1
newpersn Posted October 13, 2017 Author Posted October 13, 2017 Safe in the sense it'll allow you, but obviously it'll remove any option for them to restore it if they wanted to as effectively that'll purge the contents, but unless you stop them using recycle bins it'll rewrite new stuff when they delete it don't forget Steve Whats the best way of disabling/deleting them?
Steve21 Posted October 13, 2017 Posted October 13, 2017 There's a GPO to disable them - "Do not move deleted files to the Recycle" but obviously it you fully disable them recyclebin doesn't save anything (which we prefer, but some like it I know). You can leave it enabled, but use a logoffscript to delete them, so they can use it just for that session. Or there is a 3rd party exe that works by deleting files in the recycle bin over a set date ago (like delprof but for recycle bins), but not sure if it's been updated recently as we don't use bins anymore Steve 1
ADMaster Posted October 13, 2017 Posted October 13, 2017 I run this in between terms or when i notice space being taken up by recycle bins. $studirs = gci d:\Students\ -Recurse -Directory -Attributes h -Filter `$RECYCLE.BIN foreach ($stu in $studirs ) { $dir = $stu.FullName echo $dir $colItems = (Get-ChildItem $dir -recurse | Measure-Object -property length -sum) "{0:N2}" -f ($colItems.sum / 1MB) + " MB" $total += $colItems.Sum Remove-Item $dir -Recurse -Force } $totaldel = "{0:N2}" -f ($total / 1gb) echo "Total Deleted $totaldel GB" 1
newpersn Posted October 17, 2017 Author Posted October 17, 2017 Can i get robocopy to skip files in the folder?
Steve21 Posted October 17, 2017 Posted October 17, 2017 You can add /XD on to exclude a folder, e.g. /XD "$RECYCLE.BIN" or whatever yours is called Steve 1
newpersn Posted October 17, 2017 Author Posted October 17, 2017 You can add /XD on to exclude a folder, e.g. /XD "$RECYCLE.BIN" or whatever yours is called Steve Thank you. Save it from being copied over to the NAS. Saves some space
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now