Seting Quotas on a shared folder

Posted on 2004-10-06
Last Modified: 2008-01-09
I know that you can set Quotas on a shared drive. but can quotas be set on a just a shared folder on a drive without affecting the other folders on the drive? This is on a AD domain.
Question by:crazijoe

Accepted Solution

internetsavant earned 150 total points
ID: 12242441
Well your question is kind of cryptic but I'll give it a shot:

Disk Quotas can only be set on actual logical drives, not just folders.  Reason being, Quota management is done at the device level.  BUT, when you check Disk Quotas at the drive level, you can set a default limit.  After the default limit was set, you can use Quota Entries to manage each user specifically.  Like say your default is max = 250MB and the warning = 225MB, you can then go into quota entries, double click on the user and change their specific entry to whatever you want it to be so everyone isn't constrained by that default setting at the root...
LVL 11

Assisted Solution

gothicbloody earned 50 total points
ID: 12243042
To implement Quota.bat for any given share, place a limit.txt file in the shared folder. The limit.txt file has one line of data in the following syntax:

Megabyte_quota Blat_command


Megabyte_quota is the number of megabytes allowed (quota) and Blat_command is the full BLAT command to email quota.log, which Quota.bat will create in the folder, to as many users as you wish, without the subject (-s "This is the Subject"). Here is a sample limit.txt file, for the C:\ZIPNEW folder:

50 blat C:\ZIPNEW\QUOTA.log -to

Quota.log will contain a line similar to:

<Drive:>\SharedFolder megabyte Limit=nnn, Used=nnn, Over_Quota=nnn

Remove inherited permissions from limit.txt and grant the System and Administrator Full Control. You may wish to grant selected users read access.

The syntax for using Quota.bat on the 'server' that hosts the shared folder is:

quota <Drive:>\SharedFolder\limit.txt

You can create an allquota.bat file, that contains one line for each limit.txt file, and schedule it to run each hour:

@echo off
call quota <Drive:>\SharedFolder1\limit.txt
call quota <Drive:>\SharedFolder2\limit.txt
call quota <Drive:>\SharedFolder3\limit.txt

Quota.bat contains:

@echo off
if {%1}=={} goto syntax
if not exist %1 goto syntax
FOR /f "Tokens=1*" %%a in ('type %1') do set /a limit=%%a&set blatcmd=%%b
for /f "skip=3 Tokens=1 Delims=. " %%c in ('diruse /m %~DP1') do set /a used=%%c
if %used% LSS %limit% goto done
set /a over=%used% - %limit%
@echo %~DP1 megabyte Limit=%limit%, Used=%used%, Over_Quota=%over% >%~DP1quota.log
%blatcmd% -s "Quota on %~DP1 Exceeded"
goto :EOF
@echo Syntax: quota limitfile


Author Comment

ID: 12248077
That 's kinda what I thought. I was hoping for an easy way out of seting quotas on clients home folders without repartitioning the drive.

Very good ideal but I was looking more to enforce the quotas than to just have warnings.
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.


Expert Comment

ID: 12249318
you probably don't want to repartition anything, just get another physical drive and use that for like a "home" folder drive or something.  that'd be the easiest

Author Comment

ID: 12249569
The problem is that we have a Dell PowerVault that was set up as a single big 409GB partition (this was done before I started here) and the have the home folders for all the users on this partition. They also have other data on the drive that the users need to get at and change if nessesary.
Repartitioning the PowerVault still should be done anyway.

Expert Comment

ID: 12249887
cool, it was just a suggestion, good luck

Assisted Solution

stardust126 earned 50 total points
ID: 12256878
Try to use a 3rd party tool that will do that for you. Microsoft does not supply a solution for this.

Author Comment

ID: 12277848
Well, I decided to set quotas on the drive for certian people that we needed to baby sit. This will do for now. We are getting new servers next spring  (gotta love an owner who doesn't want to be behind on technology) so I'll repartition the PowerVault then.

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Occasionally Windows/Microsoft Updates will fail to update. We have found a code that will delete all temporary files and re-register all dll's related to Windows/Microsoft Updates! This works 99% of the time to get the updates working again! The…
As the title indicates, I have done this before. It chills me everytime I update the OS on my phone, ( because one time I did this and I essentially had a bricked …
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question