I know a workaround, where one calculates sizes of all files and then you subtract this from your default space, but is there any direct way to do it? Simplicity and speed are important.
There's the way to calculate free RAM with external call
ReadList["!typeperf \"\\Memory\\Available Bytes\" -sc 1", Word,
RecordLists -> True, WordSeparators -> {","}] //
ToExpression@Part[#, 2, 2] &
Is there any way to do the same but for disk space?
SOLVED
StringJoin[
ReadList["!dir c:\ ", Word, RecordLists -> True,
WordSeparators -> {" ", ","}][[-1, 3 ;; -3]]] // ToExpression
gives the amount of free memory on disk C in bytes)


dirgives this information in its output. – Oleksandr R. Dec 22 '12 at 1:26Select[ ReadList["!df", Word, RecordLists -> True, WordSeparators -> {",", " "}], First@# == "/dev/disk1" & ]should do the trick (on OSX and I guess linux) – acl Dec 22 '12 at 1:40\LogicalDisk(*)\Free Megabytes, so you can usetypeperfto get the information if you like. However, this only works if your user account has the "profile system performance" privilege assigned. By default this is only granted to Administrators! – Oleksandr R. Dec 22 '12 at 1:44dfcall, I'd display all disks:TableForm[Transpose[{##2}], TableHeadings -> {#, Automatic}] & @@ ReadList["!df -l -k", Word, RecordLists -> True, WordSeparators -> {",", " "}]– Jens Dec 22 '12 at 5:45