{"id":656,"date":"2016-10-06T19:56:28","date_gmt":"2016-10-06T17:56:28","guid":{"rendered":"http:\/\/rostman\/?p=656"},"modified":"2016-10-06T19:56:28","modified_gmt":"2016-10-06T17:56:28","slug":"powershell-directory-name-must-be-less-than-248-characters","status":"publish","type":"post","link":"https:\/\/rostman.eu\/index.php\/2016\/10\/06\/powershell-directory-name-must-be-less-than-248-characters\/","title":{"rendered":"Powershell: directory name must be less than 248 characters"},"content":{"rendered":"<p>Mo\u017ce si\u0119 przyda<\/p>\n<p>Uda\u0142o mi si\u0119 obej\u015b\u0107, prymitywnie, ale uda\u0142o si\u0119, ograniczenie powershella<\/p>\n<p>Mianowicie to: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters<\/p>\n<p>Zamiast: Remove-Item na ko\u0144cu robi\u0119 Move-Item do innego folderu i nie wywala b\u0142\u0119du d\u0142ugich nazw<\/p>\n<p>A poleceniem dosowe rmdir nie ma problemu z kasowaniem d\u0142ugich \u015bcie\u017cek, plik\u00f3w<\/p>\n<p>[sourcecode language=&#8221;powershell&#8221;]<br \/>\nCmd \/C &quot;mkdir R:\\DO_SKASOWANIA&quot;<br \/>\nGet-ChildItem -Path &quot;R:\\BACKUP&quot; | Where-Object { $_.CreationTime -lt (Get-Date).AddDays(-5)} | Move-Item -Destination &quot;R:\\DO_SKASOWANIA&quot;<br \/>\nCmd \/C &quot;rmdir \/S \/Q R:\\DO_SKASOWANIA&quot;[\/sourcecode]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Mo\u017ce si\u0119 przyda Uda\u0142o mi si\u0119 obej\u015b\u0107, prymitywnie, ale uda\u0142o si\u0119, ograniczenie powershella Mianowicie to: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters Zamiast: Remove-Item na ko\u0144cu robi\u0119 Move-Item do innego folderu [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[99,100,101],"_links":{"self":[{"href":"https:\/\/rostman.eu\/index.php\/wp-json\/wp\/v2\/posts\/656"}],"collection":[{"href":"https:\/\/rostman.eu\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rostman.eu\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rostman.eu\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rostman.eu\/index.php\/wp-json\/wp\/v2\/comments?post=656"}],"version-history":[{"count":0,"href":"https:\/\/rostman.eu\/index.php\/wp-json\/wp\/v2\/posts\/656\/revisions"}],"wp:attachment":[{"href":"https:\/\/rostman.eu\/index.php\/wp-json\/wp\/v2\/media?parent=656"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rostman.eu\/index.php\/wp-json\/wp\/v2\/categories?post=656"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rostman.eu\/index.php\/wp-json\/wp\/v2\/tags?post=656"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}