• Post Reply Bookmark Topic Watch Topic
  • New Topic

Program or Utility to Check disk space in the System & mail with the current space.  RSS feed

 
Kuldeep Singh
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Friends and moderators,
I am really need of a javascript or java code which can be use to check disk space in the computer every week and send a mail with the current disk space.
If it is not possible to run the script automatically in every week.
that is also fine. i can manage with it.

I am also ready to have the code in other language, but i think i will not need to look anywhere else because Chemp are here.

Regards,
Kuldeep Singh
Tata Consultancy Services.
Mumbai
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Kuldeep",
Welcome to the JavaRanch.

We're a friendly group, but we do require members to have valid display names.

Display names must be two words: your first name, a space, then your last name. Fictitious names are not allowed.

Please edit your profile and correct your display name since accounts with invalid display names get deleted.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my opinion Java is the wrong tool for the job, and Javascript would be worse. If you are on *nix, look at cron (for timing), df (for disk space) and mail (for email)
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
vis
 
Rob Spoor
Sheriff
Posts: 21135
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well technically it's possible if you use Java 6. File has a method called getFreeSpace() with which you can check if you have enough left, and with JavaMail you can send the emails.

But I agree with David that, especially under Linux / Unix, native tools are better.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!