{"id":232,"date":"2007-05-12T17:17:31","date_gmt":"2007-05-12T15:17:31","guid":{"rendered":" http:\/\/www.nsonic.de\/blog\/2007\/05\/getdiskfreespace\/"},"modified":"2007-05-12T17:17:33","modified_gmt":"2007-05-12T15:17:33","slug":"getdiskfreespace","status":"publish","type":"post","link":"https:\/\/www.nsonic.de\/blog\/2007\/05\/getdiskfreespace\/","title":{"rendered":"GetDiskFreeSpace"},"content":{"rendered":"<p>[code lang=&#8221;delphi&#8221;]procedure TForm1.Button3Click(Sender: TObject);<br \/>\nVar<br \/>\n  RootPath : String;<br \/>\n  Sec_Cluster, Bytes_Sec, Free_Clusters, Total_Clusters : DWord;<br \/>\nbegin<br \/>\n  \/\/ Set the Drive to check<br \/>\n  RootPath := &#8216;C:\\&#8217;;<br \/>\n  GetDiskFreeSpace(PChar(RootPath), Sec_Cluster, Bytes_Sec, Free_Clusters, Total_Clusters);<br \/>\n  \/\/ Lets put information into a ListBox<br \/>\n  ListBox1.Items.Add(&#8216;RootPath : &#8216; + RootPath);<br \/>\n  ListBox1.Items.Add(&#8216;Sectors Per Cluster : &#8216; + IntToStr(Sec_Cluster));<br \/>\n  ListBox1.Items.Add(&#8216;Bytes Per Sector : &#8216; + IntToStr(Bytes_Sec));<br \/>\n  ListBox1.Items.Add(&#8216;Free Clusters : &#8216; + IntToStr(Free_Clusters));<br \/>\n  ListBox1.Items.Add(&#8216;Total Clusters : &#8216; + IntToStr(Total_Clusters));<br \/>\n  ListBox1.Items.Add(&#8216;Free Bytes : &#8216; + IntToStr(Bytes_Sec * Sec_Cluster * Free_Clusters));<br \/>\n  ListBox1.Items.Add(&#8216;Total Bytes : &#8216; + IntToStr(Bytes_Sec * Sec_Cluster * Total_Clusters));<br \/>\nend;<br \/>\n[\/code]<\/p>\n<p>[tags]Delphi, System[\/tags]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[code lang=&#8221;delphi&#8221;]procedure TForm1.Button3Click(Sender: TObject); Var RootPath : String; Sec_Cluster, Bytes_Sec, Free_Clusters, Total_Clusters : DWord; begin \/\/ Set the Drive to check RootPath :=&hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":""},"categories":[11],"tags":[75,113],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p71Tml-3K","_links":{"self":[{"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/posts\/232"}],"collection":[{"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/comments?post=232"}],"version-history":[{"count":0,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/posts\/232\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/media?parent=232"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/categories?post=232"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/tags?post=232"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}