{"id":7443,"date":"2012-06-06T07:00:00","date_gmt":"2012-06-06T07:00:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/2012\/06\/06\/dont-be-helpless-what-might-be-the-reason-for-a-path-not-found-error\/"},"modified":"2012-06-06T07:00:00","modified_gmt":"2012-06-06T07:00:00","slug":"dont-be-helpless-what-might-be-the-reason-for-a-path-not-found-error","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20120606-00\/?p=7443","title":{"rendered":"Don&#039;t be helpless: What might be the reason for a &#034;Path not found&#034; error?"},"content":{"rendered":"<p>\nInternally at Microsoft, we have a programmer&#8217;s tool which I will call\n<a HREF=\"http:\/\/blogs.msdn.com\/b\/oldnewthing\/archive\/2009\/04\/16\/9551818.aspx\">\nProgram&nbsp;Q<\/a>.\nOn the peer-to-peer mailing list for Program&nbsp;Q,\nsomebody asked the following question:\n<\/p>\n<blockquote CLASS=\"q\">\n<p>\nWhen I try to do a\n<code>q edit template template_name<\/code>,\ninstead of opening an editor window where I can modify the template,\nI get the following error:\n<\/p>\n<pre>\nError opening for write:\nC:\\Users\\Waldo\\AppData\\Local\\Temp\\2\\t144t4.tmp\nThe system cannot find the path specified.\n<\/pre>\n<p>\nCan you help resolve this error?\n<\/p>\n<\/blockquote>\n<p>\nOkay, there is already everything you need in the error message.\nThe program even\n<a HREF=\"http:\/\/blogs.msdn.com\/b\/oldnewthing\/archive\/2010\/01\/27\/9953807.aspx\">\nconverted the error number to error text for you<\/a>.\nYou just have to read it and think about what it&#8217;s telling you.\n<\/p>\n<blockquote CLASS=\"m\">\n<p>\nThe file is\n<code>C:\\Users\\Waldo\\AppData\\Local\\Temp\\2\\t144t4.tmp<\/code>.\nTherefore the path is\n<code>C:\\Users\\Waldo\\AppData\\Local\\Temp\\2<\/code>.\nI leave you to determine the next step in the investigation.\n<\/p>\n<\/blockquote>\n<p>\nThat was apparently not enough of a nudge in the right direction.\n<\/p>\n<blockquote CLASS=\"q\">\n<p>\nWhile the error message does say &#8220;The system cannot find the path\nspecified,&#8221;\nthe fact remains that I did not specify a path at all.\nThe path in the error message is completely unknown to me.\nI could try to navigate to that path in Windows Explorer,\nbut I doubt that this has anything to do with resolving the problem.\n<\/p>\n<p>\nNormally, I get an editor window that lets me edit the template,\nbut instead I get this strange error message which I&#8217;ve never\nseen before.\n<\/p>\n<p>\nI did not try to navigate to the path mentioned in the error message\nsimply because the mentioned Temp folder\n<code>C:\\Users\\Waldo\\AppData\\Local\\Temp<\/code>\nis completely empty!\n<\/p>\n<\/blockquote>\n<p>\nThe helplessness is so thick you can cut it with a knife!\nI also find it astonishing that the person thinks that verifying whether the\npath can be found is totally unrelated to resolving a &#8220;Path not found&#8221; error.\n<\/p>\n<p>\nDon&#8217;t forget, this is a programmer&#8217;s tool.\nOne should assume that the people who use it have some level\nof technical skill!\n<\/p>\n<p>\nOkay, first we have a &#8220;Path not found&#8221; error, and there is a\nfully-qualified file name whose path couldn&#8217;t be found.\nFirst thing to check is whether the path really exists.\nFrom the most recent reply,\none can see that the answer is &#8220;No, it does not exist.&#8221;\nThe <code>2<\/code> subdirectory is missing from the\n<code>Temp<\/code> directory.\n<\/p>\n<p>\nOkay, so we verified that the error message is valid.\nThe next thing to determine is where the program got this\npath from.\nThe person already recognized that it was the\n<code>Temp<\/code> directory,\nand it shouldn&#8217;t be a huge deductive leap to determine that\nthe path probably came from the <code>TEMP<\/code> or\n<code>TMP<\/code> environment variable.\n<\/p>\n<p>\nThe observation that the <code>Temp<\/code> directory is completely\nempty suggests that the person, in an obsessive-compulsive fit,\ndeleted everything from the <code>Temp<\/code> directory,\nincluding the <code>2<\/code> subdirectory.\nToo bad that\n<a HREF=\"http:\/\/blogs.msdn.com\/b\/oldnewthing\/archive\/2011\/01\/25\/10119675.aspx\">\ntheir <code>TEMP<\/code> environment variable\nstill contained a reference to it<\/a>.\n<\/p>\n<p>\nAs a result, any program that wants to create a temporary file\nwill try to create it in a directory that doesn&#8217;t exist.\nResult:\n&#8220;Path not found.&#8221;\n<\/p>\n<p>\nThe fix: Re-create the <code>2<\/code> subdirectory that you\nmistakenly deleted.\n(And yes, this fixed the problem.)\n<\/p>\n<p>\nIt somehow seemed completely surprising to this person that\na &#8220;Path not found&#8221; error could possibly mean that a path couldn&#8217;t be found.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Internally at Microsoft, we have a programmer&#8217;s tool which I will call Program&nbsp;Q. On the peer-to-peer mailing list for Program&nbsp;Q, somebody asked the following question: When I try to do a q edit template template_name, instead of opening an editor window where I can modify the template, I get the following error: Error opening for [&hellip;]<\/p>\n","protected":false},"author":1069,"featured_media":111744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[26],"class_list":["post-7443","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-other"],"acf":[],"blog_post_summary":"<p>Internally at Microsoft, we have a programmer&#8217;s tool which I will call Program&nbsp;Q. On the peer-to-peer mailing list for Program&nbsp;Q, somebody asked the following question: When I try to do a q edit template template_name, instead of opening an editor window where I can modify the template, I get the following error: Error opening for [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/7443","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/users\/1069"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/comments?post=7443"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/7443\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media\/111744"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media?parent=7443"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=7443"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=7443"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}