Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2004-08-06
6
Medium Priority
?
2,177 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 1000 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
Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

 
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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

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…
Let's take a look into the basics of ransomware—how it spreads, how it can hurt us, and why a disaster recovery plan is important.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

604 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