{"id":113,"date":"2007-05-12T14:26:27","date_gmt":"2007-05-12T12:26:27","guid":{"rendered":" http:\/\/www.nsonic.de\/blog\/2007\/05\/deltree\/"},"modified":"2007-05-12T14:26:28","modified_gmt":"2007-05-12T12:26:28","slug":"deltree","status":"publish","type":"post","link":"https:\/\/www.nsonic.de\/blog\/2007\/05\/deltree\/","title":{"rendered":"Deltree"},"content":{"rendered":"<p>[code lang=&#8221;delphi&#8221;]procedure DelTree(StartDir: string);<br \/>\nvar<br \/>\n  Search : TSearchRec;<br \/>\nbegin<br \/>\nif Startdir[Length(Startdir)] <> &#8216;\\&#8217; then<br \/>\n  startdir := startdir + &#8216;\\&#8217;;<br \/>\n  if FindFirst(startdir + &#8216;*.*&#8217;, faAnyFile, Search) = 0 then<br \/>\n  repeat<br \/>\n    if (Search.Name[1] <> &#8216;.&#8217; ) then<br \/>\n      if ((Search.Attr and faDirectory) > 0) then<br \/>\n      begin<br \/>\n        RmDir(StartDir + Search.Name);<br \/>\n        ChangeFAttrib(StartDir + Search.Name);<br \/>\n      end else<br \/>\n      begin<br \/>\n        DeleteFile(StartDir + Search.Name);<br \/>\n        Application.ProcessMessages;<br \/>\n      end;<br \/>\n  until FindNext(Search) <> 0;<br \/>\n  FindClose(Search);<br \/>\nend;<br \/>\n[\/code]<\/p>\n<p>[tags]Delphi, File[\/tags]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[code lang=&#8221;delphi&#8221;]procedure DelTree(StartDir: string); var Search : TSearchRec; begin if Startdir[Length(Startdir)] &#8216;\\&#8217; then startdir := startdir + &#8216;\\&#8217;; if FindFirst(startdir + &#8216;*.*&#8217;, faAnyFile,&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,99],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/s71Tml-deltree","_links":{"self":[{"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/posts\/113"}],"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=113"}],"version-history":[{"count":0,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/posts\/113\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/media?parent=113"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/categories?post=113"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/tags?post=113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}