{"id":55,"date":"2014-08-05T13:40:35","date_gmt":"2014-08-05T12:40:35","guid":{"rendered":"http:\/\/banfi.co.uk\/blog\/?p=55"},"modified":"2014-08-05T13:40:51","modified_gmt":"2014-08-05T12:40:51","slug":"get-files-in-folder-and-the-date-in-vb-net","status":"publish","type":"post","link":"https:\/\/banfi.co.uk\/blog\/2014\/08\/get-files-in-folder-and-the-date-in-vb-net\/","title":{"rendered":"Get files in folder and the date in vb.net"},"content":{"rendered":"<p>I&#8217;m using this in a project that monitor files on a server folder.<br \/>\nThis folder contains any failures that have not processed on the server.<br \/>\nI then display this on a screen with the filename and date to make sure we know what it is and the time it happened.<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">\r\n           Dim files() As String = IO.Directory.GetFiles(&quot;X:\\Path\\To\\Files&quot;)\r\n\r\n            For Each file As String In files\r\n\r\n                'Get the date and time modified of this file\r\n                FDate = IO.File.GetLastWriteTime(file)\r\n                'tidy the filename up by removing the .ext of the name\r\n                file = Replace(file, &quot;.ext&quot;, &quot;&quot;)\r\n\r\n\r\n                testBox.Text = testBox.Text + file + &quot; &quot; + FDate + Environment.NewLine\r\n\r\n            Next\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m using this in a project that monitor files on a server folder. This folder contains any failures that have not processed on the server. I then display this on a screen with the filename and date to make sure we know what it is and the time it happened. Dim files() As String = &hellip; <a href=\"https:\/\/banfi.co.uk\/blog\/2014\/08\/get-files-in-folder-and-the-date-in-vb-net\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Get files in folder and the date in vb.net<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4,5,3],"tags":[],"class_list":["post-55","post","type-post","status-publish","format-standard","hentry","category-net","category-vb-net","category-visual-basic"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/banfi.co.uk\/blog\/wp-json\/wp\/v2\/posts\/55","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/banfi.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/banfi.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/banfi.co.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/banfi.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=55"}],"version-history":[{"count":1,"href":"https:\/\/banfi.co.uk\/blog\/wp-json\/wp\/v2\/posts\/55\/revisions"}],"predecessor-version":[{"id":56,"href":"https:\/\/banfi.co.uk\/blog\/wp-json\/wp\/v2\/posts\/55\/revisions\/56"}],"wp:attachment":[{"href":"https:\/\/banfi.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=55"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/banfi.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=55"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/banfi.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=55"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}