Batch file to check disk space on a server

Discussion in 'Programming' started by kurtyash, Sep 22, 2016.

  1. #1
    Hello,

    I am new to programing. I would like to know how to create an easy script to check disk space on a server.

    Thanking you in advance
     
    kurtyash, Sep 22, 2016 IP
  2. Einheijar

    Einheijar Well-Known Member

    Messages:
    539
    Likes Received:
    13
    Best Answers:
    3
    Trophy Points:
    165
    #2
    Is that a linux or windows server? If linux just type
    df
    Code (markup):
    to get free space if windows, well right click my computer or if you really need a cmd script
    
    wmic /node:"%COMPUTERNAME%" LogicalDisk Where DriveType="3" Get DeviceID,FreeSpace|find /I "c:"
    
    Code (markup):
    replace c: with your own drive
     
    Einheijar, Oct 2, 2016 IP