Try below script to know the used space on a drive.
sub DoDir (Root)
for each File in filelist (Root&'\*.*')
LOAD '$(File)' as Name,
FileSize( '$(File)' ) as Size,
FileTime( '$(File)' ) as FileTime
for each Dir in dirlist (Root&'\*' )
call DoDir (Dir)
call DoDir ('C:')
Change C: to D: drive to know its size.
Once script loads just do a Sum(Size) to know the size of that drive.