General discussion

Locked

Automating report for Disk Space Left on

By lchungwe ·
Tell me how running a bat file or script to locate how much disk space is left on server and save it as a text-delimited file or tab-delimited format file or update a existing Excel Files.

This conversation is currently closed to new comments.

7 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Automating report for Disk Space Left on

by SyscoKid In reply to Automating report for Dis ...

Well, one quick and dirty way is a simple bat file on the server with two lines:

C:
dir >> C:\TEMP\DISKSPACE.TXT

You'll get a lot of extra information, but you'll get free disk space too.

If you're on NT, you could make it a .cmd file and use the AT service to run it regularly.

If you're on 95 or 98, you could use chkdsk instead of dir. It would give less extraneous info.

Collapse -

Automating report for Disk Space Left on

by lchungwe In reply to Automating report for Dis ...

The question was auto-closed by TechRepublic

Collapse -

Automating report for Disk Space Left on

by etowah In reply to Automating report for Dis ...

Space.bat file

echo off
dir > c:\temp\temp.tmp
findstr "free" c:\temp\temp.tmp>c:\temp\space.txt
del c:\temp\temp.tmp

The space.txt file in the c:\temp directory will have your free space in it.

Collapse -

Automating report for Disk Space Left on

by lchungwe In reply to Automating report for Dis ...

The question was auto-closed by TechRepublic

Collapse -

Automating report for Disk Space Left on

by joncr In reply to Automating report for Dis ...

Heres a kix script that produces a CSV file that can be loaded directly into Excel. You can download kix from microsoft.com.
This will produce a single file of all computers running it with their computer name in column A and space in MB in column B when loaded into Excel.


; kix script to log disk space to a file (comma limited)
; run by typing - kix32.exe freedisk.kix

$dspace = GetDiskSpace("c:\")
$pcname = @WKSTA

; this specifies the file, use a common network mapping to
; log all pc info in one file. (netlogon is common).

open(1,"f:\filelog.csv",5)
$dummyvar = writeline(1,$pcname + "," + $dspace + Chr(13) + Chr(10) )
Close(1)

Collapse -

Automating report for Disk Space Left on

by lchungwe In reply to Automating report for Dis ...

The question was auto-closed by TechRepublic

Collapse -

Automating report for Disk Space Left on

by lchungwe In reply to Automating report for Dis ...

This question was auto closed due to inactivity

Back to Windows Forum
7 total posts (Page 1 of 1)  

Related Discussions

Related Forums