{"id":2724,"date":"2019-10-25T09:47:53","date_gmt":"2019-10-25T08:47:53","guid":{"rendered":"https:\/\/solidt.eu\/site\/?p=2724"},"modified":"2022-07-25T08:33:25","modified_gmt":"2022-07-25T07:33:25","slug":"c-windows-open-file-in-explorer-selected","status":"publish","type":"post","link":"https:\/\/solidt.eu\/site\/c-windows-open-file-in-explorer-selected\/","title":{"rendered":"C# Windows: open file in explorer (selected)"},"content":{"rendered":"\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/\/ using System.Diagnostics;\ntry\n{\n\tstring args = string.Format(\"\/e, \/select, \\\"{0}\\\"\", fileName);\n\tProcessStartInfo info = new ProcessStartInfo();\n\tinfo.FileName = \"explorer\";\n\tinfo.Arguments = args;\n\tProcess.Start(info);\n}\ncatch (Exception ex)\n{\n\tLog.Write(LogLevel.Warning, $\"Error opening folder of file: {fileName})\", ex);\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[6,4,1],"tags":[],"class_list":["post-2724","post","type-post","status-publish","format-standard","hentry","category-dotnet","category-programming","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts\/2724","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/comments?post=2724"}],"version-history":[{"count":1,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts\/2724\/revisions"}],"predecessor-version":[{"id":2725,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts\/2724\/revisions\/2725"}],"wp:attachment":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/media?parent=2724"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/categories?post=2724"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/tags?post=2724"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}