{"id":1735,"date":"2017-01-27T21:05:49","date_gmt":"2017-01-27T21:05:49","guid":{"rendered":"http:\/\/elbsolutions.com\/projects\/?p=1735"},"modified":"2022-02-03T11:24:31","modified_gmt":"2022-02-03T17:24:31","slug":"deal-files-name-longer-259-characters","status":"publish","type":"post","link":"https:\/\/elbsolutions.com\/projects\/deal-files-name-longer-259-characters\/","title":{"rendered":"How to deal with files with a name longer than 259 characters?"},"content":{"rendered":"<p>The fileinfo class that is the standard class to use for getting fullname of a file will produce an error when the path is too long. This is a path that windows allows but the class can&#8217;t handle the error. More on the subject is <a href=\"http:\/\/stackoverflow.com\/questions\/5188527\/how-to-deal-with-files-with-a-name-longer-than-259-characters\" target=\"_blank\" rel=\"noopener noreferrer\">described here<\/a>.<\/p>\n<p>After much research I installed the nuget package <a href=\"https:\/\/github.com\/UweKeim\/ZetaLongPaths\" target=\"_blank\" rel=\"noopener noreferrer\">ZetaLong Paths<\/a>. Just searched for it and chose the appropriate file as shown below.<\/p>\n<p><a href=\"http:\/\/elbsolutions.com\/projects\/wp-content\/uploads\/2017\/01\/ZetaLong.bmp\"><img decoding=\"async\" class=\"alignnone size-medium wp-image-1739\" src=\"http:\/\/elbsolutions.com\/projects\/wp-content\/uploads\/2017\/01\/ZetaLong-300x64.bmp\" alt=\"\" width=\"300\" height=\"64\" srcset=\"https:\/\/elbsolutions.com\/projects\/wp-content\/uploads\/2017\/01\/ZetaLong-300x64.bmp 300w, https:\/\/elbsolutions.com\/projects\/wp-content\/uploads\/2017\/01\/ZetaLong-600x129.jpg 600w, https:\/\/elbsolutions.com\/projects\/wp-content\/uploads\/2017\/01\/ZetaLong-768x165.bmp 768w, https:\/\/elbsolutions.com\/projects\/wp-content\/uploads\/2017\/01\/ZetaLong-500x107.bmp 500w, https:\/\/elbsolutions.com\/projects\/wp-content\/uploads\/2017\/01\/ZetaLong.bmp 816w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>The article that pointed me to the solution can be found <a href=\"http:\/\/stackoverflow.com\/questions\/5188527\/how-to-deal-with-files-with-a-name-longer-than-259-characters\">here<\/a>. It also lays out some alternative methods.<\/p>\n<p>After I installed the package I was able to use fileinfo methods such as fullname without any path too long error. Just change fileinfo to ZpFileInfo for methods using fileinfo.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The fileinfo class that is the standard class to use for getting fullname of a file will produce an error when the path is too long. This is a path that windows allows but the class can&#8217;t handle the error. More on the subject is described here. After much research I installed the nuget package [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"image","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1735","post","type-post","status-publish","format-image","hentry","category-general","post_format-post-format-image"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to deal with files with a name longer than 259 characters? - ELB Solutions.com Inc.<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/elbsolutions.com\/projects\/deal-files-name-longer-259-characters\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to deal with files with a name longer than 259 characters? - ELB Solutions.com Inc.\" \/>\n<meta property=\"og:description\" content=\"The fileinfo class that is the standard class to use for getting fullname of a file will produce an error when the path is too long. This is a path that windows allows but the class can&#8217;t handle the error. More on the subject is described here. After much research I installed the nuget package [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/elbsolutions.com\/projects\/deal-files-name-longer-259-characters\/\" \/>\n<meta property=\"og:site_name\" content=\"ELB Solutions.com Inc.\" \/>\n<meta property=\"article:published_time\" content=\"2017-01-27T21:05:49+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-02-03T17:24:31+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/elbsolutions.com\/projects\/wp-content\/uploads\/2017\/01\/ZetaLong-300x64.bmp\" \/>\n<meta name=\"author\" content=\"Etienne Bley\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Etienne Bley\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/deal-files-name-longer-259-characters\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/deal-files-name-longer-259-characters\\\/\"},\"author\":{\"name\":\"Etienne Bley\",\"@id\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/#\\\/schema\\\/person\\\/51e717c68f4f5917c63baf88f0896c39\"},\"headline\":\"How to deal with files with a name longer than 259 characters?\",\"datePublished\":\"2017-01-27T21:05:49+00:00\",\"dateModified\":\"2022-02-03T17:24:31+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/deal-files-name-longer-259-characters\\\/\"},\"wordCount\":130,\"image\":{\"@id\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/deal-files-name-longer-259-characters\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/elbsolutions.com\\\/projects\\\/wp-content\\\/uploads\\\/2017\\\/01\\\/ZetaLong-300x64.bmp\",\"articleSection\":[\"General\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/deal-files-name-longer-259-characters\\\/\",\"url\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/deal-files-name-longer-259-characters\\\/\",\"name\":\"How to deal with files with a name longer than 259 characters? - ELB Solutions.com Inc.\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/deal-files-name-longer-259-characters\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/deal-files-name-longer-259-characters\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/elbsolutions.com\\\/projects\\\/wp-content\\\/uploads\\\/2017\\\/01\\\/ZetaLong-300x64.bmp\",\"datePublished\":\"2017-01-27T21:05:49+00:00\",\"dateModified\":\"2022-02-03T17:24:31+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/#\\\/schema\\\/person\\\/51e717c68f4f5917c63baf88f0896c39\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/deal-files-name-longer-259-characters\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/deal-files-name-longer-259-characters\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/deal-files-name-longer-259-characters\\\/#primaryimage\",\"url\":\"http:\\\/\\\/elbsolutions.com\\\/projects\\\/wp-content\\\/uploads\\\/2017\\\/01\\\/ZetaLong-300x64.bmp\",\"contentUrl\":\"http:\\\/\\\/elbsolutions.com\\\/projects\\\/wp-content\\\/uploads\\\/2017\\\/01\\\/ZetaLong-300x64.bmp\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/deal-files-name-longer-259-characters\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to deal with files with a name longer than 259 characters?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/#website\",\"url\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/\",\"name\":\"ELB Solutions.com Inc.\",\"description\":\"Bringing all your IT Pieces together\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/#\\\/schema\\\/person\\\/51e717c68f4f5917c63baf88f0896c39\",\"name\":\"Etienne Bley\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f8971dfb65b25b768415568f83247df4057f15d037137e386928a804e2c997b9?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f8971dfb65b25b768415568f83247df4057f15d037137e386928a804e2c997b9?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f8971dfb65b25b768415568f83247df4057f15d037137e386928a804e2c997b9?s=96&d=mm&r=g\",\"caption\":\"Etienne Bley\"},\"url\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/author\\\/etienne-bley\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to deal with files with a name longer than 259 characters? - ELB Solutions.com Inc.","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:\/\/elbsolutions.com\/projects\/deal-files-name-longer-259-characters\/","og_locale":"en_US","og_type":"article","og_title":"How to deal with files with a name longer than 259 characters? - ELB Solutions.com Inc.","og_description":"The fileinfo class that is the standard class to use for getting fullname of a file will produce an error when the path is too long. This is a path that windows allows but the class can&#8217;t handle the error. More on the subject is described here. After much research I installed the nuget package [&hellip;]","og_url":"https:\/\/elbsolutions.com\/projects\/deal-files-name-longer-259-characters\/","og_site_name":"ELB Solutions.com Inc.","article_published_time":"2017-01-27T21:05:49+00:00","article_modified_time":"2022-02-03T17:24:31+00:00","og_image":[{"url":"http:\/\/elbsolutions.com\/projects\/wp-content\/uploads\/2017\/01\/ZetaLong-300x64.bmp","type":"","width":"","height":""}],"author":"Etienne Bley","twitter_misc":{"Written by":"Etienne Bley","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/elbsolutions.com\/projects\/deal-files-name-longer-259-characters\/#article","isPartOf":{"@id":"https:\/\/elbsolutions.com\/projects\/deal-files-name-longer-259-characters\/"},"author":{"name":"Etienne Bley","@id":"https:\/\/elbsolutions.com\/projects\/#\/schema\/person\/51e717c68f4f5917c63baf88f0896c39"},"headline":"How to deal with files with a name longer than 259 characters?","datePublished":"2017-01-27T21:05:49+00:00","dateModified":"2022-02-03T17:24:31+00:00","mainEntityOfPage":{"@id":"https:\/\/elbsolutions.com\/projects\/deal-files-name-longer-259-characters\/"},"wordCount":130,"image":{"@id":"https:\/\/elbsolutions.com\/projects\/deal-files-name-longer-259-characters\/#primaryimage"},"thumbnailUrl":"http:\/\/elbsolutions.com\/projects\/wp-content\/uploads\/2017\/01\/ZetaLong-300x64.bmp","articleSection":["General"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/elbsolutions.com\/projects\/deal-files-name-longer-259-characters\/","url":"https:\/\/elbsolutions.com\/projects\/deal-files-name-longer-259-characters\/","name":"How to deal with files with a name longer than 259 characters? - ELB Solutions.com Inc.","isPartOf":{"@id":"https:\/\/elbsolutions.com\/projects\/#website"},"primaryImageOfPage":{"@id":"https:\/\/elbsolutions.com\/projects\/deal-files-name-longer-259-characters\/#primaryimage"},"image":{"@id":"https:\/\/elbsolutions.com\/projects\/deal-files-name-longer-259-characters\/#primaryimage"},"thumbnailUrl":"http:\/\/elbsolutions.com\/projects\/wp-content\/uploads\/2017\/01\/ZetaLong-300x64.bmp","datePublished":"2017-01-27T21:05:49+00:00","dateModified":"2022-02-03T17:24:31+00:00","author":{"@id":"https:\/\/elbsolutions.com\/projects\/#\/schema\/person\/51e717c68f4f5917c63baf88f0896c39"},"breadcrumb":{"@id":"https:\/\/elbsolutions.com\/projects\/deal-files-name-longer-259-characters\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/elbsolutions.com\/projects\/deal-files-name-longer-259-characters\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/elbsolutions.com\/projects\/deal-files-name-longer-259-characters\/#primaryimage","url":"http:\/\/elbsolutions.com\/projects\/wp-content\/uploads\/2017\/01\/ZetaLong-300x64.bmp","contentUrl":"http:\/\/elbsolutions.com\/projects\/wp-content\/uploads\/2017\/01\/ZetaLong-300x64.bmp"},{"@type":"BreadcrumbList","@id":"https:\/\/elbsolutions.com\/projects\/deal-files-name-longer-259-characters\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/elbsolutions.com\/projects\/"},{"@type":"ListItem","position":2,"name":"How to deal with files with a name longer than 259 characters?"}]},{"@type":"WebSite","@id":"https:\/\/elbsolutions.com\/projects\/#website","url":"https:\/\/elbsolutions.com\/projects\/","name":"ELB Solutions.com Inc.","description":"Bringing all your IT Pieces together","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/elbsolutions.com\/projects\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/elbsolutions.com\/projects\/#\/schema\/person\/51e717c68f4f5917c63baf88f0896c39","name":"Etienne Bley","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f8971dfb65b25b768415568f83247df4057f15d037137e386928a804e2c997b9?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/f8971dfb65b25b768415568f83247df4057f15d037137e386928a804e2c997b9?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f8971dfb65b25b768415568f83247df4057f15d037137e386928a804e2c997b9?s=96&d=mm&r=g","caption":"Etienne Bley"},"url":"https:\/\/elbsolutions.com\/projects\/author\/etienne-bley\/"}]}},"_links":{"self":[{"href":"https:\/\/elbsolutions.com\/projects\/wp-json\/wp\/v2\/posts\/1735","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/elbsolutions.com\/projects\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/elbsolutions.com\/projects\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/elbsolutions.com\/projects\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/elbsolutions.com\/projects\/wp-json\/wp\/v2\/comments?post=1735"}],"version-history":[{"count":4,"href":"https:\/\/elbsolutions.com\/projects\/wp-json\/wp\/v2\/posts\/1735\/revisions"}],"predecessor-version":[{"id":2681,"href":"https:\/\/elbsolutions.com\/projects\/wp-json\/wp\/v2\/posts\/1735\/revisions\/2681"}],"wp:attachment":[{"href":"https:\/\/elbsolutions.com\/projects\/wp-json\/wp\/v2\/media?parent=1735"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/elbsolutions.com\/projects\/wp-json\/wp\/v2\/categories?post=1735"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/elbsolutions.com\/projects\/wp-json\/wp\/v2\/tags?post=1735"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}