Check disk free space from Matlab or GNU Octave with matlab-stdlib:
free_space = stdlib.diskfree('C:\');