{"id":1430,"date":"2016-09-09T10:39:58","date_gmt":"2016-09-09T08:39:58","guid":{"rendered":"https:\/\/www.nullalo.com\/?p=1430"},"modified":"2025-10-22T10:15:45","modified_gmt":"2025-10-22T08:15:45","slug":"windows-to-fix-invalid-file-handle-error","status":"publish","type":"post","link":"https:\/\/www.nullalo.com\/en\/windows-how-to-fix-invalid-file-handle-error\/","title":{"rendered":"Windows: how to fix &#8220;Invalid file handle&#8221; error"},"content":{"rendered":"<p><\/p>\n<p style=\"text-align: justify;\"><span style=\"line-height: 1.5;\">One reason for the\u00a0&#8220;<strong>Invalid file handle<\/strong>&#8221; error in Windows when deleting a file is that a reserved name is used for its name.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"line-height: 1.5;\">Infact, as stated in <\/span><a style=\"line-height: 1.5;\" href=\"https:\/\/msdn.microsoft.com\/en-us\/library\/aa365247(VS.85).aspx#namespaces\" target=\"_blank\">this<\/a><span style=\"line-height: 1.5;\">\u00a0Microsoft article, during files\/folders creation in Windows filesystem <strong>you should not use\u00a0the following reserved names<\/strong>:<\/span><\/p>\n<p style=\"text-align: center;\">CON, PRN, AUX, NUL<\/p>\n<p style=\"text-align: center;\">COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9<\/p>\n<p style=\"text-align: center;\">LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, LPT9<\/p>\n<p style=\"text-align: justify;\">Also avoid these names followed immediately by an extension; for example, NUL.txt is not recommended.<\/p>\n<p style=\"text-align: justify;\">If for any reason you find yourself having to handle a file of this type, maybe copied\u00a0from other file systems (eg. from a Linux PC with ext3\/4 partition or from the internal memory of your smartphone), know that there are a couple of ways to delete\u00a0these elements.<\/p>\n<p style=\"text-align: justify;\">One solution\u00a0is to <strong>delete file\/folder from command prompt prefixing its full path with either <a href=\"file:\/\/.\/\">\\\\.\\<\/a> or <a href=\"file:\/\/%3F\/\">\\\\?\\<\/a><\/strong>.<\/p>\n<p style=\"text-align: justify;\">For example, if you want to delete the C:\\Temp\\con\\ folder, simply issue the following command at the prompt:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">rd \\\\.\\c:\\Temp\\con \/S \/Q<\/pre>\n<p style=\"text-align: justify;\">To delete instead the file C:\\Temp\\con.txt, the command to run will be:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">del \\\\.\\c:\\Temp\\con.txt<\/pre>\n<p style=\"text-align: justify;\">In other cases, where the reason for the &#8220;Handle Invalid file&#8221; is not attributable to its name, you can use the following command (assume that the file name is c:\\Temp\\test.txt):<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">fsutil reparsepoint delete c:\\Temp\\prova.txt\r\ndel c:\\Temp\\prova.txt<\/pre>\n<p style=\"text-align: justify;\">A <strong>reparse point<\/strong> is an object in a file system with attributes that activate extended functionality.\u00a0After you delete the reparse point with the first of the two commands above, you can delete the file with the standard procedure.<\/p>\n<p style=\"text-align: justify;\">Finally, if both of these methods fail, probably your storage media is physically damaged, in which case the only options you have left are a deep scandisk or hardware replace.<\/p>\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>One reason for the\u00a0&#8220;Invalid file handle&#8221; error in Windows when deleting a file is that a reserved name is used for its name. Infact, as stated in this\u00a0Microsoft article, during files\/folders creation in Windows filesystem you should not use\u00a0the following reserved names: CON, PRN, AUX, NUL COM1, COM2, COM3, COM4,<\/p>\n","protected":false},"author":2,"featured_media":918,"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,"footnotes":""},"categories":[12],"tags":[113,114,72,115,112],"class_list":["post-1430","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-windows","tag-file","tag-handle","tag-windows","tag-elimina","tag-non-valido"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Windows: how to fix &quot;Invalid file handle&quot; error - Nullalo!<\/title>\n<meta name=\"description\" content=\"Uno dei motivi per cui in Windows si verifica l&#039;errore &quot;Handle del file non valido&quot; durante l&#039;eliminazione di un file \u00e8 che per tale file \u00e8 stato\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.nullalo.com\/?p=1430\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Windows: how to fix &quot;Invalid file handle&quot; error - Nullalo!\" \/>\n<meta property=\"og:description\" content=\"Uno dei motivi per cui in Windows si verifica l&#039;errore &quot;Handle del file non valido&quot; durante l&#039;eliminazione di un file \u00e8 che per tale file \u00e8 stato\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.nullalo.com\/?p=1430\" \/>\n<meta property=\"og:site_name\" content=\"Nullalo!\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/nullalo\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/fulvio.sicurezza\" \/>\n<meta property=\"article:published_time\" content=\"2016-09-09T08:39:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-10-22T08:15:45+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.nullalo.com\/wp-content\/uploads\/2015\/07\/microsoft.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1140\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Fulvio Sicurezza\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/FulvioSicurezza\" \/>\n<meta name=\"twitter:site\" content=\"@Nullalo\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Fulvio Sicurezza\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.nullalo.com\/?p=1430\",\"url\":\"https:\/\/www.nullalo.com\/?p=1430\",\"name\":\"[:it]Windows: come risolvere l'errore \\\"Handle del file non valido\\\"[:en]Windows: how to fix \\\"Invalid file handle\\\" error[:] - Nullalo!\",\"isPartOf\":{\"@id\":\"https:\/\/www.nullalo.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.nullalo.com\/?p=1430#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.nullalo.com\/?p=1430#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.nullalo.com\/wp-content\/uploads\/2015\/07\/microsoft.jpg\",\"datePublished\":\"2016-09-09T08:39:58+00:00\",\"dateModified\":\"2025-10-22T08:15:45+00:00\",\"author\":{\"@id\":\"https:\/\/www.nullalo.com\/#\/schema\/person\/fe9c2885376a6ab076e06461ae1b546c\"},\"description\":\"Uno dei motivi per cui in Windows si verifica l'errore \\\"Handle del file non valido\\\" durante l'eliminazione di un file \u00e8 che per tale file \u00e8 stato\",\"breadcrumb\":{\"@id\":\"https:\/\/www.nullalo.com\/?p=1430#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.nullalo.com\/?p=1430\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.nullalo.com\/?p=1430#primaryimage\",\"url\":\"https:\/\/www.nullalo.com\/wp-content\/uploads\/2015\/07\/microsoft.jpg\",\"contentUrl\":\"https:\/\/www.nullalo.com\/wp-content\/uploads\/2015\/07\/microsoft.jpg\",\"width\":1140,\"height\":600},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.nullalo.com\/?p=1430#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.nullalo.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Windows: come risolvere l&#8217;errore &#8220;Handle del file non valido&#8221;\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.nullalo.com\/#website\",\"url\":\"https:\/\/www.nullalo.com\/\",\"name\":\"Nullalo!\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.nullalo.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.nullalo.com\/#\/schema\/person\/fe9c2885376a6ab076e06461ae1b546c\",\"name\":\"Fulvio Sicurezza\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.nullalo.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.nullalo.com\/wp-content\/uploads\/2015\/02\/Fulvio-Sicurezza_avatar_1424711147-96x96.jpg\",\"contentUrl\":\"https:\/\/www.nullalo.com\/wp-content\/uploads\/2015\/02\/Fulvio-Sicurezza_avatar_1424711147-96x96.jpg\",\"caption\":\"Fulvio Sicurezza\"},\"sameAs\":[\"http:\/\/www.generalservice.na.it\",\"https:\/\/www.facebook.com\/fulvio.sicurezza\",\"http:\/\/it.linkedin.com\/in\/fulviosicurezza\",\"https:\/\/x.com\/https:\/\/twitter.com\/FulvioSicurezza\",\"https:\/\/www.youtube.com\/c\/FulvioSicurezzaIT\"],\"url\":\"https:\/\/www.nullalo.com\/en\/author\/f-sicurezza\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Windows: how to fix \"Invalid file handle\" error - Nullalo!","description":"Uno dei motivi per cui in Windows si verifica l'errore \"Handle del file non valido\" durante l'eliminazione di un file \u00e8 che per tale file \u00e8 stato","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.nullalo.com\/?p=1430","og_locale":"en_US","og_type":"article","og_title":"Windows: how to fix \"Invalid file handle\" error - Nullalo!","og_description":"Uno dei motivi per cui in Windows si verifica l'errore \"Handle del file non valido\" durante l'eliminazione di un file \u00e8 che per tale file \u00e8 stato","og_url":"https:\/\/www.nullalo.com\/?p=1430","og_site_name":"Nullalo!","article_publisher":"https:\/\/www.facebook.com\/nullalo","article_author":"https:\/\/www.facebook.com\/fulvio.sicurezza","article_published_time":"2016-09-09T08:39:58+00:00","article_modified_time":"2025-10-22T08:15:45+00:00","og_image":[{"width":1140,"height":600,"url":"https:\/\/www.nullalo.com\/wp-content\/uploads\/2015\/07\/microsoft.jpg","type":"image\/jpeg"}],"author":"Fulvio Sicurezza","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/FulvioSicurezza","twitter_site":"@Nullalo","twitter_misc":{"Written by":"Fulvio Sicurezza","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.nullalo.com\/?p=1430","url":"https:\/\/www.nullalo.com\/?p=1430","name":"[:it]Windows: come risolvere l'errore \"Handle del file non valido\"[:en]Windows: how to fix \"Invalid file handle\" error[:] - Nullalo!","isPartOf":{"@id":"https:\/\/www.nullalo.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.nullalo.com\/?p=1430#primaryimage"},"image":{"@id":"https:\/\/www.nullalo.com\/?p=1430#primaryimage"},"thumbnailUrl":"https:\/\/www.nullalo.com\/wp-content\/uploads\/2015\/07\/microsoft.jpg","datePublished":"2016-09-09T08:39:58+00:00","dateModified":"2025-10-22T08:15:45+00:00","author":{"@id":"https:\/\/www.nullalo.com\/#\/schema\/person\/fe9c2885376a6ab076e06461ae1b546c"},"description":"Uno dei motivi per cui in Windows si verifica l'errore \"Handle del file non valido\" durante l'eliminazione di un file \u00e8 che per tale file \u00e8 stato","breadcrumb":{"@id":"https:\/\/www.nullalo.com\/?p=1430#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.nullalo.com\/?p=1430"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.nullalo.com\/?p=1430#primaryimage","url":"https:\/\/www.nullalo.com\/wp-content\/uploads\/2015\/07\/microsoft.jpg","contentUrl":"https:\/\/www.nullalo.com\/wp-content\/uploads\/2015\/07\/microsoft.jpg","width":1140,"height":600},{"@type":"BreadcrumbList","@id":"https:\/\/www.nullalo.com\/?p=1430#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.nullalo.com\/"},{"@type":"ListItem","position":2,"name":"Windows: come risolvere l&#8217;errore &#8220;Handle del file non valido&#8221;"}]},{"@type":"WebSite","@id":"https:\/\/www.nullalo.com\/#website","url":"https:\/\/www.nullalo.com\/","name":"Nullalo!","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.nullalo.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.nullalo.com\/#\/schema\/person\/fe9c2885376a6ab076e06461ae1b546c","name":"Fulvio Sicurezza","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.nullalo.com\/#\/schema\/person\/image\/","url":"https:\/\/www.nullalo.com\/wp-content\/uploads\/2015\/02\/Fulvio-Sicurezza_avatar_1424711147-96x96.jpg","contentUrl":"https:\/\/www.nullalo.com\/wp-content\/uploads\/2015\/02\/Fulvio-Sicurezza_avatar_1424711147-96x96.jpg","caption":"Fulvio Sicurezza"},"sameAs":["http:\/\/www.generalservice.na.it","https:\/\/www.facebook.com\/fulvio.sicurezza","http:\/\/it.linkedin.com\/in\/fulviosicurezza","https:\/\/x.com\/https:\/\/twitter.com\/FulvioSicurezza","https:\/\/www.youtube.com\/c\/FulvioSicurezzaIT"],"url":"https:\/\/www.nullalo.com\/en\/author\/f-sicurezza\/"}]}},"_links":{"self":[{"href":"https:\/\/www.nullalo.com\/en\/wp-json\/wp\/v2\/posts\/1430","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.nullalo.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nullalo.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nullalo.com\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nullalo.com\/en\/wp-json\/wp\/v2\/comments?post=1430"}],"version-history":[{"count":1,"href":"https:\/\/www.nullalo.com\/en\/wp-json\/wp\/v2\/posts\/1430\/revisions"}],"predecessor-version":[{"id":1935,"href":"https:\/\/www.nullalo.com\/en\/wp-json\/wp\/v2\/posts\/1430\/revisions\/1935"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.nullalo.com\/en\/wp-json\/wp\/v2\/media\/918"}],"wp:attachment":[{"href":"https:\/\/www.nullalo.com\/en\/wp-json\/wp\/v2\/media?parent=1430"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nullalo.com\/en\/wp-json\/wp\/v2\/categories?post=1430"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nullalo.com\/en\/wp-json\/wp\/v2\/tags?post=1430"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}