Jump to content

How to Get an available space for an specific disk automatically


Recommended Posts

Posted

Dear all:

 

I have to record the available space for an specific disk everyday, in

order to get information for a future analysis. Nowadays, I logged in

to the server and get that information manually. But I would like to

have something that brings this information to me, like email, or

writting a log, or something else. I don't know if there is any visual

basic funtion that do that.

 

Your help will be really appreciated.

 

Best Regards

 

LIR

  • Replies 3
  • Created
  • Last Reply
Guest Pegasus \(MVP\)
Posted

Re: How to Get an available space for an specific disk automatically

 

 

"lir" <laurainesr@gmail.com> wrote in message

news:e4432d1f-08ca-4987-816c-b93100bff1ba@z66g2000hsc.googlegroups.com...

> Dear all:

>

> I have to record the available space for an specific disk everyday, in

> order to get information for a future analysis. Nowadays, I logged in

> to the server and get that information manually. But I would like to

> have something that brings this information to me, like email, or

> writting a log, or something else. I don't know if there is any visual

> basic funtion that do that.

>

> Your help will be really appreciated.

>

> Best Regards

>

> LIR

 

A simple batch file will do:

@echo off

for /F "tokens=3" %%a in ('dir c:\ ^| find /i "bytes free"') do set free=%%a

blat.exe -.. -subject "%ComputerName% %free%" -..

 

Use the Task Scheduler to run this batch file once every day on

your server.

 

blat.exe is a free command line mailer that you can download from

a number of sites.

Posted

Re: How to Get an available space for an specific disk automatically

 

Pegasus: That bat file is ready to be run? I have set the path for

blat.exe file:

 

@echo off

for /F "tokens=3" %%a in ('dir d:\ ^| find /i "bytes free"') do set

free=%%a

d:\public\blat.exe -.. -subject "%ComputerName% %free%" -..

 

I would like to know where should I set the email address?

 

Thanks a lot for your help, I hope this will help me.

 

Best regards

 

LIR

Guest Pegasus \(MVP\)
Posted

Re: How to Get an available space for an specific disk automatically

 

 

"lir" <laurainesr@gmail.com> wrote in message

news:c2b9fbfc-eb96-415c-9dcf-45f1c714ce87@z72g2000hsb.googlegroups.com...

> Pegasus: That bat file is ready to be run? I have set the path for

> blat.exe file:

>

> @echo off

> for /F "tokens=3" %%a in ('dir d:\ ^| find /i "bytes free"') do set

> free=%%a

> d:\public\blat.exe -.. -subject "%ComputerName% %free%" -..

>

> I would like to know where should I set the email address?

>

> Thanks a lot for your help, I hope this will help me.

>

> Best regards

>

> LIR

 

In such cases, as with all commands you're not familiar with, you type

eithter blat /? or simply blat. This will give you LOTS of help! Look

for things like "recipient" and SMTP server! Don't bother installing

anything - just run it.

 

 

Blat v1.9.4: WinNT/95 console utility to mail a file via SMTP

by P.Mendes, M.Neal, G.Vollant, T. Charron

http://www.blat.net

syntax:

Blat <filename> -to <recipient> [optional switches (see below)]

Blat -install <server addr> <sender's addr> [<try>[<port>[<profile>]]]

[-q]

Blat -profile [-delete | "<default>"] [profile1] [profileN] [-q]

Blat -h [-q]

 

-install <server addr> <sender's addr> [<try n times> [<port> [<profile>]]]

: set's SMTP server, sender, number of tries and port for profile

(<try n times> and <port> may be replaced by '-').

 

<filename> : file with the message body ('-' for console input, end with

^Z)

-to <recipient> : recipient list (also -t) (comma separated)

-tf <recipient> : recipient list filename

-subject <subj>: subject line (also -s)

-f <sender> : overrides the default sender address (must be known to

server)

-i <addr> : a 'From:' address, not necessarily known to the SMTP

server.

-cc <recipient>: carbon copy recipient list (also -c) (comma separated)

-cf <file> : cc recipient list filename

-bcc <recipient>: blind carbon copy recipient list (also -bcc) (comma

separated)

-bf <file> : bcc recipient list filename

-organization <organization>: Organization field (also -o and -org)

-body <text> : Message body

-x <X-Header: detail>: Custom 'X-' header. eg: -x "X-INFO: Blat is Great!"

-r : Request return receipt.

-d : Request disposition notification.

-h : displays this help.

-q : supresses *all* output.

-debug : Echoes server communications to screen (disables '-q').

-noh : prevent X-Mailer header from showing homepage of blat

-noh2 : prevent X-Mailer header entirely

-p <profile> : send with SMTP server, user and port defined in <profile>.

-priority <pr> : set message priority 0 for low, 1 for high.

-server <addr> : Specify SMTP server to be used. (optionally, addr:port)

-port <port> : port to be used on the server, defaults to SMTP (25)

-hostname <hst>: select the hostname used to send the message

-mime : MIME Quoted-Printable Content-Transfer-Encoding.

-enriched : Send an enriched text message (Content-Type=text/enriched)

-html : Send an HTML message (Content-Type=text/html)

-uuencode : Send (binary) file UUEncoded

-base64 : Send (binary) file using base64 (binary Mime)

-try <n times> : how many time blat should try to send. from '1' to

'INFINITE'

-attach <file> : attach binary file to message (may be repeated)

-attacht <file>: attach text file to message (may be repeated)

-ti <n> : Set timeout to 'n' seconds.

-u <username> : Username for AUTH LOGIN (use with -pw)

-pw <password> : Password for AUTH LOGIN (use with -u)

-log <filename>: Log everything but usage to <filname>

-plain : Use AUTH PLAIN to login to SMTP server (use with -u -pw)

-charset <cs> : User defined charset. The default is ISO-8859-1

 

Note that if the '-i' option is used, <sender> is included in 'Reply-to:'

and 'Sender:' fields in the header of the message.

 

Optionally, the following options can be used instead of the -f and -i

options:

 

-mailfrom <addr> The RFC 821 MAIL From: statement

-from <addr> The RFC 822 From: statement

-replyto <addr> The RFC 822 Reply-To: statement

-returnpath <addr> The RFC 822 Return-Path: statement

-sender <addr> The RFC 822 Sender: statement

 

For backward consistency, the -f and -i options have precedence over these

RFC 822 defined options. If both -f and -i options are omitted then the

RFC 821 MAIL FROM statement will be defaulted to use the

installation-defined

default sender address


×
×
  • Create New...