View previous topic :: View next topic |
Author |
Message |
RTAdams89 -
Joined: 06 Nov 2005 Posts: 102
|
Posted: Thu Dec 22, 2005 7:05 pm Post subject: Disk space management |
|
|
I have a free-for-all upload area on my site. Users can upload and download files from it. The upload size is restricted to 4MB, but I want to also restrict the total space all the files take up. Is there some sort of program I can run to limit the maximum size of the folder holding all the files?
I'm running windows XP home. |
|
Back to top |
|
 |
AbyssUnderground -
Joined: 31 Dec 2004 Posts: 3855
|
Posted: Thu Dec 22, 2005 7:16 pm Post subject: |
|
|
You could try using a quota if you are using NTFS. Make a username and set that usename to a quota of whatever you want as a maximum and then in your FTP program (if thats what you use) tell it to logon as that user and it will act as no more free disk space once the quota is met.
Ive not tried this myself but in theory it should work.
Alternativly find an ftp server program that will limit folder size for you.
An extreame way of doing it would to make a seperate partition to the size you want. This could mean formatting your hard drive unless you have a partition manager program. _________________ Andy (AbyssUnderground) (previously The Inquisitor)
www.abyssunderground.co.uk |
|
Back to top |
|
 |
richardyork -
Joined: 22 Jun 2004 Posts: 411 Location: United Kingdom
|
|
Back to top |
|
 |
RTAdams89 -
Joined: 06 Nov 2005 Posts: 102
|
Posted: Thu Dec 22, 2005 7:28 pm Post subject: |
|
|
The uploads are handled by a php script, so there is no ftping involved. I've tried the disk quota thing, but it doesnt work all that great. Making a special partition might work...
I found a program called MeRiQuota that almost does what i want. The only problem is that it doesnt have an option to "lock" the folder. It does have the ability to run a command though. Is there a windows command that I could run to prevent more files being added to the folder? |
|
Back to top |
|
 |
MonkeyNation -
Joined: 05 Feb 2005 Posts: 921 Location: Cardiff
|
Posted: Sat Dec 24, 2005 10:41 am Post subject: |
|
|
RTAdams89 wrote: | The uploads are handled by a php script, so there is no ftping involved. I've tried the disk quota thing, but it doesnt work all that great. Making a special partition might work...
I found a program called MeRiQuota that almost does what i want. The only problem is that it doesnt have an option to "lock" the folder. It does have the ability to run a command though. Is there a windows command that I could run to prevent more files being added to the folder? |
Why don't you check the folder size at runtime?
You could check the folder size with a few lines of code, or if it's likely to get large and slow to count, you could store a variable and tally up the folder size as each file gets uploaded. _________________
 |
|
Back to top |
 |
 |
|