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.
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.


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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
windows 10 free update 45 135
Phone number for Microsoft server activation issues 3 55
URL to download Windows 10 Home 7 134
Reusing a former RAID Member as a data drive 18 126
Introduction Often we come across situations wherein our batch files would be needing to reboot Windows for a variety of reasons. A few of them would be like: (1) Setup files have been updated whose changes can take effect only after a reboot …
Windows 10 is here and for most admins this means frustration and challenges getting that first working Windows 10 image. As in my previous sysprep articles, I've put together a simple help guide to get you through this process. The aim is to achiev…
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.

839 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