Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 file folder size
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Etymon
Advanced Member

United States
2385 Posts

Posted - 27 June 2003 :  22:28:39  Show Profile  Visit Etymon's Homepage

Does anyone know how to limit the size of a member's file folder who has an uploaded file folder for images, files, etc? For example, if I want a file folder to only be 150K and allow only a total of that amount to be used. I want my members to be able to upload images into their own folder, but I don't want them to be able to put more than just so much in it.

Thank you,

Etymon

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 27 June 2003 :  22:32:44  Show Profile
you would just need to add some fso code to check for the folder size before you allowed uploading. So assuming you have an object called fldr which represents the users folder, just use fldr.Size to grab the size in bytes.

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

Etymon
Advanced Member

United States
2385 Posts

Posted - 28 June 2003 :  01:56:24  Show Profile  Visit Etymon's Homepage
quote:
Originally posted by Nikkol

you would just need to add some fso code to check for the folder size before you allowed uploading. So assuming you have an object called fldr which represents the users folder, just use fldr.Size to grab the size in bytes.



Thank you Nikkol for the reply!

Would you mind helping me with this? I am using Huw's file upload for Snitz 3.3, and you know how scarce help for this MOD is .

There is a process for checking the image size and allowing/disallowing it before uploading to the server. Could I adapt this code for the fldr.Size you mentioned?

I'll look into the code and see what I come up with.

Etymon

Edited by - Etymon on 28 June 2003 01:58:57
Go to Top of Page

Etymon
Advanced Member

United States
2385 Posts

Posted - 29 June 2003 :  04:43:21  Show Profile  Visit Etymon's Homepage
Ok,

I went to Microsoft and found this:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/sgProgrammingFileSystemObject.asp

specifically refering to:

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' GenerateFolderInformation
' Purpose:
' Generates a string describing the current state of a folder.
' Demonstrates the following
' - Folder.Path
' - Folder.Name
' - Folder.DateCreated
' - Folder.DateLastAccessed
' - Folder.DateLastModified
' - Folder.Size
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

I also found two scripts ... one in VBScript and the other in JScript at:

http://www.out-think.co.uk/Articles/Script3.txt

and

http://www.out-think.co.uk/Articles/Script4.txt

I will try to figure something out from these.



Etymon

Edited by - Etymon on 29 June 2003 04:47:42
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.28 seconds. Powered By: Snitz Forums 2000 Version 3.4.07