I was Wandering How I would Make A batchfile that sets a folder to read-only if it reach Said Size (1GB?)
What I got So Far:
@echo off
color 0b
set /p slimit=Set Max file size:
set /p location=Folder Directory:
cls
color 0a
:loop
echo Limiting File "%location%" at %slimit%.
ATTRIB +R %location% /sd | if errorlevel 1 goto :next1
:next1
echo Limiting File "%location%" at %slimit%..
ATTRIB +R %location% /sd | if errorlevel 1 goto :next2
:next2
echo Limiting File "%location%" at %slimit%...
ATTRIB +R %location% /sd | if errorlevel 1 goto :next3
:next3
goto :loop
Really My only thing is how do I make it so that when It hits the Limit Set, It uses the attrib
string. Also the errorlevels may be horribly messed up, My first time using errorlevels.