Solved

DOS commands to find out Hard drive used/free space on remote server

Posted on 2004-08-06
6
2,150 Views
Last Modified: 2012-05-05
i need a DOS command that i can put in a batch file that will show how much hard drive space/used/free is on a remote server. i do not want a thirdparty tool or VB script.
0
Comment
Question by:xxgenius
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 5

Accepted Solution

by:
Big5250 earned 250 total points
ID: 11738636
srvinfo.exe from the resource kit

hth
0
 
LVL 16

Expert Comment

by:robrandon
ID: 11738643
There is a pearl script on the Windows Resource Kit that you may be able to call from your DOS batch file.  It is called diskusage.pl.  I'm not sure how you would work with the output in your batch file.  This is an excerpt from the help file:


Example 2: Display Information About Remote Folders
The following command displays information about several folders on a remote computer, SERVER01. It uses the -s parameter to identify the computer, and the -u and -p parameters to run the script tool in a security context that has the required permissions.

diskusage.pl c:\art c:\schedules c:\documents -s SERVER01 -u RESKIT\Administrator -p 43232#!DSFD

In response, Diskusage.pl displays the following information about the folders. The Path\File field shows the location of each object.


  Size(KB)    Compressed Type     Total Files Path\File
------------- ---------- ---------- ----------- -----------------
     3.384766   Yes        File       N/A     c:\art\arrow.gif
     3.384766   Yes        File       N/A     c:\art\banner.gif
          N/A   Yes        Directory  2       c:\art\current
          N/A   Yes        Directory  1       c:\art\new files
     0.022344   No         File       N/A     c:\schedules\event_i.txt
10,458.670000   No         File       N/A     c:\schedules\thurs.mov
     6.884340   No         File       N/A     c:\docs\about.htm
     1.480000   No         File       N/A     c:\docs\props.csv
          N/A   No         Directory  7       c:\docs\renew


--------------------------------------------------------------------------------
0
 
LVL 16

Expert Comment

by:robrandon
ID: 11738651
Looks like srvinfo.exe works much better....
0
Comparison of Amazon Drive, Google Drive, OneDrive

What is Best for Backup: Amazon Drive, Google Drive or MS OneDrive? In this free whitepaper we look at their performance, pricing, and platform availability to help you decide which cloud drive is right for your situation. Download and read the results of our testing for free!

 
LVL 14

Expert Comment

by:dlwyatt82
ID: 11738821
I don't know if you consider resource kit utilities as "Third Party". If you don't want to use srvinfo or any of the other scripts / tools available in the resource kit, you can get the Free space of a drive simply by using the Dir command, something like this:

net use z: \\Server\c$ > nul 2>&1
dir z: | findstr /i /C:"bytes free"
net use z: /delete > nul 2>&1
0
 
LVL 5

Expert Comment

by:LordRipper
ID: 11742663
well the easyiest way to do it is just to share the hardrive on the server ..... then map it on your computer as another drive ..... lets say drive F
then creat a batch file and paste the following into it

echo For you by LordRipper  .....
Echo Please wait this may take a phew minutes
CHKDSK F: /I /C
pause

this will do a disk scanning almost like a scandisk ...... but afterwords it'll show you free/used space on the server
goodluck
0
 
LVL 8

Author Comment

by:xxgenius
ID: 11752330
i liked all the ideas, but i'm going to go with Big5250.  this is the easiest since it does not need to be installed on the server or pc(just needs the file).  since it is from MS resource kit, it can be trusted, unlike freeware or VB scripts written by other people.  it gives a bit more then needed, but it does include what i need.  i didn't want to create shares to the server that needs to be monitored.  i don't want the users who require this info to have their hands on this server.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question