{"id":88,"date":"2006-09-13T20:04:21","date_gmt":"2006-09-13T18:04:21","guid":{"rendered":"http:\/\/contoso.se\/blog\/?p=88"},"modified":"2006-12-29T14:07:48","modified_gmt":"2006-12-29T12:07:48","slug":"kontrollera-om-det-finns-nagra-err-filer","status":"publish","type":"post","link":"http:\/\/contoso.se\/blog\/?p=88","title":{"rendered":"Check if there are any *.err files"},"content":{"rendered":"<p>This script checks if there is any .err files in the directory. If there is any, a event is generated in the local event viewer.<\/p>\n<p><code>Dim fso<br \/>\nSet fso = CreateObject(\"Scripting.FileSystemObject\")<br \/>\nSet folder = fso.getfolder(\"C:\\\")<br \/>\nFor Each File in Folder.Files<br \/>\nIf fso.GetExtensionName(File)=\"err\" Then<\/code><code> <\/code><code>Const EVENT_WARNING = 2<br \/>\nSet objShell = CreateObject(\"Wscript.Shell\")<br \/>\nobjShell.LogEvent EVENT_WARNING, _<br \/>\n\"There are error files in \" & folder<br \/>\nEnd If<br \/>\nNext<\/code><code> <\/code><code><\/p>\n<p \/><\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This script checks if there is any .err files in the directory. If there is any, a event is generated in the local event viewer. Dim fso Set fso = CreateObject(&#8220;Scripting.FileSystemObject&#8221;) Set folder = fso.getfolder(&#8220;C:\\&#8221;) For Each File in Folder.Files If fso.GetExtensionName(File)=&#8221;err&#8221; Then Const EVENT_WARNING = 2 Set objShell = CreateObject(&#8220;Wscript.Shell&#8221;) objShell.LogEvent EVENT_WARNING, _ &#8220;There &hellip; <a href=\"http:\/\/contoso.se\/blog\/?p=88\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[2,13],"tags":[],"_links":{"self":[{"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/posts\/88"}],"collection":[{"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=88"}],"version-history":[{"count":0,"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/posts\/88\/revisions"}],"wp:attachment":[{"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=88"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=88"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=88"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}