I am trying to remove a directory with numerous files with long file names. I am unable to do GUI based normal delete and I turned for a command based delete. But even so I am setting this error shown in image below. Can some one guide me?
Asked
Active
Viewed 38 times
0
-
See some answers here: [Delete directory regardless of 260 char limit](https://stackoverflow.com/questions/16392765/delete-directory-regardless-of-260-char-limit) – Olaf Reitz Aug 28 '17 at 10:05
-
1You can try to do something like this: `$Y = New-Object -ComObject WScript.Network $Y.MapNetworkDrive( "Y:", "\\Hostname\C$\rcptttest\Foldername1\Foldername2\foldername3", "true", "domain\username", "password" ) Remove-Item Y:\Foldername4\Foldername5 -recurse -Force $Y.RemoveNetworkDrive( "Y:" )` – Vitaly Aug 28 '17 at 10:09
-
I don't think I can access this over any other network. – Jeevan Aug 28 '17 at 10:16
-
@OlafReitz, no there are too many nested directories each with very long names. Hence I have even tried it from C: directory, even there I am unable to. – Jeevan Aug 28 '17 at 10:48