Link to home
Start Free TrialLog in
Avatar of JoshFink
JoshFinkFlag for Afghanistan

asked on

How to hide a folder based on file size minimum

Hello, I'm hoping someone can help me out.

I'm trying to figure out how to hide folders whose contents are less than 200mb in size. I want to run this script on a schedule and have it

Scan the directory E:\--TV--\

Cycle through each top level folder in the directory and determine folder contents space

< 200mb in size = Hide
> 201mb in size = Visible

Can someone point me in the right direction or help out?

Thanks

Josh
SOLUTION
Avatar of roarkinc
roarkinc
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
ASKER CERTIFIED SOLUTION
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
Avatar of JoshFink

ASKER

Question -- Does the above Powershell script also hide the main directory? E:\--TV--? If so how do I prevent that?
No, it hides only subfolders, but it does not hide subfolders of subfolders.