Solved

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

Posted on 2004-08-06
6
2,125 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
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
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 
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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Suggested Solutions

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…
We need a new way to communicate time sensitive or critical info.   The best part of my role at xMatters is visiting our clients all over the world to learn about how they operate their businesses, share insights that xMatters has gleaned across…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
I designed this idea while studying technology in the classroom.  This is a semester long project.  Students are asked to take photographs on a specific topic which they find meaningful, it can be a place or situation such as travel or homelessness.…

914 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now