Sponsored Content
Full Discussion: quota script for windows XP
Special Forums Windows & DOS: Issues & Discussions quota script for windows XP Post 302442158 by upengan78 on Tuesday 3rd of August 2010 11:50:45 AM
Old 08-03-2010
quota script for windows XP

Hi

I am Samba server which is working as a domain log on server for winxp client and user home directories are assigned 100MB quota on the linux drive.

I am trying to get below script working so that user gets informed of his disk space usage.

Code:
dim oFS, oFolder
set oFS = WScript.CreateObject("Scripting.FileSystemObject")
set oFolder = oFS.GetFolder("H:\")

Set objWMIService = GetObject("winmgmts:")
Set objLogicalDisk = objWMIService.Get("Win32_LogicalDisk.DeviceID='H:'")
Wscript.Echo "Space Used=" & int(oFolder.Size /1048576) & " MB" & vbCr & _ 
"Allowed Space: " & Int(objLogicalDisk.Size /1048576) & " MB"


Only problem with above script is that it shows space used less than what is actually used.

For example if user has consumed 28.8 MB out of 100 MB (I got this info by using right clicking the properties for user's home drive : 'H'). However, the script reports 24 MB space used. Smilie

Can anyone please help me with this script so that script shows the correct space used.

Thanks!Smilie
 

6 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Quota

I'm new to Unix and I'm trying to determin how much space I have on this system. the box is dedicated to Oracle and I log in as the oracle user and type quota. It retrunes nothing. Then I log on as root and type quota -v oracle.. It returns nothing! Gosh this is actually a solaris 5.7 box. ... (1 Reply)
Discussion started by: jarthda
1 Replies

2. HP-UX

Quota-problem

Hello, I'm having some trouble with the quota's I've set on our HP-UX B.11.00 U 9000/800. Well not really with the quota's because I was able to set them and get them working without a problem but the problem resides somewhere with our AS/U (Advanced Server for HP9000 Release B.04.06.07 and... (5 Replies)
Discussion started by: chrizz
5 Replies

3. Shell Programming and Scripting

allocate user quota using perl script

Hi I'm a student who is studying system administration. I need to write a perl script to allocate disk quota to users. I'm using ubuntu and When I try to run edquota command in command line it says that Can't find file system with quota. pls help me. I tried to edit fstab. but didn't work. ... (1 Reply)
Discussion started by: piumali
1 Replies

4. UNIX for Dummies Questions & Answers

Need Help With Quota Script

Hi everyone I'm really new to all this but i need help creating a script that will produce the following for each user when they log on using bash You are currently using 91% of your quota Consider reducing your usage The 10 biggest directories in your home directory are: Size Directory... (2 Replies)
Discussion started by: Snoop180
2 Replies

5. Shell Programming and Scripting

Unix shell script to Copy files from one Windows server to another Windows server.

Can anybody please help me on how to code for the below requirement: I need to write a shell script (on different unix server) to copy files from multiple folders (ex. BRN-000001) from one windows server (\\boldls-mwe-dev4)to a different windows server(\\rrwin-ewhd04.ecomad.int). This shell... (4 Replies)
Discussion started by: SravsJaya
4 Replies

6. Red Hat

Setting quota

I would like to set quota for ALL USERS on a particular filesystem and the quota to be set for NEWLY CREATED USERS also. I am not sure, whether my question is clear. I can set quota for all users but my requirement is, I want the same quota to be set automatically for the user which is going... (2 Replies)
Discussion started by: atanubanerji
2 Replies
PPPOE-START(8)						      System Manager's Manual						    PPPOE-START(8)

NAME
pppoe-start - Shell script to bring up a PPPoE link SYNOPSIS
pppoe-start [config_file] pppoe-start interface user [config_file] DESCRIPTION
pppoe-start is a shell script which starts the Roaring Penguin user-space PPPoE client. If you omit config_file, the default file /etc/ppp/pppoe.conf is used. If you supply interface and user, then they override the Ethernet interface and user-name settings in the configuration file. AUTHOR
pppoe-start was written by David F. Skoll <dfs@roaringpenguin.com>. The pppoe home page is http://www.roaringpenguin.com/pppoe/. SEE ALSO
pppoe(8), pppoe-stop(8), pppoe-connect(8), pppd(8), pppoe.conf(5), pppoe-setup(8), pppoe-status(8), pppoe-sniff(8), pppoe-relay(8), pppoe- server(8) 4th Berkeley Distribution 21 February 2000 PPPOE-START(8)
All times are GMT -4. The time now is 11:13 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy