Jump to content

Recommended Posts

Posted

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?

Posted

That's the hidden folder for where recycled stuff goes :p Assuming you have the C access disabled.

 

You can disable recycle bin fully, or did you want it on just not the folder?

 

Steve

  • Thanks 1
Posted
That's the hidden folder for where recycled stuff goes :p 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...

Posted

Safe in the sense it'll allow you, but obviously it'll remove any option for them to restore it if they wanted to :p 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

  • Thanks 1
Posted
Safe in the sense it'll allow you, but obviously it'll remove any option for them to restore it if they wanted to :p 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?

Posted

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

  • Thanks 1
Posted

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"

  • Thanks 1
Posted
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 :)

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 account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...