Jump to content

Recommended Posts

Posted

Does anyone else find it annoying when staff create folders within folders to an unnecessary depth, ie; 10 folders deep?

Is there a way to prevent users doing this?

It certainly is a pain when I have to delete folders that overuse the 256 characters allowed by Windows as it doesn't easily allow deletion.

 

Ideally I would like to set a preset level for users.

 

Any ideas?

Posted
I dont know if there is a way to block it as such as its a quirk of unc/mapped drives although Windows 10/2016 can be enabled to allow you to browse and delete those folders, I cant remember the exact setting to turn it on though.
Posted
Windows 10/2016 can be enabled to allow you to browse and delete those folders, I can't remember the exact setting to turn it on though.

Are you thinking of the "Enable Win32 long paths" setting...

 

www.edugeek.net/forums/windows-10/170886-microsoft-removes-260-character-path-length-limit-windows-10-a.html

 

As of Windows 10 v1709, Microsoft still haven't enabled long path support in File Explorer so the GPO mentioned in that thread has zero effect. :(

  • Thanks 1
Posted (edited)
You may be able to powershell to the affected folders.

An issue I found when using PowerShell* to find long paths is that it doesn't find all of them, whereas the Get-ChildItem2 cmdlet from the NTFSSecurity module does because it uses the AlphaFS .NET library instead of relying on Windows.

 

The file system support in .NET is pretty good for most uses. However there are a few shortcomings, which this library tries to alleviate. The most notable deficiency of the standard .NET System.IO is the lack of support of advanced NTFS features, most notably extended length path support (eg. file/directory paths longer than 260 characters).

 

PS C:\WINDOWS\system32> [b]$x = Get-ChildItem -Path 'D:\' -Recurse -EA 0 | Where-Object { $_.FullName.Length -gt 260 }[/b]
PS C:\WINDOWS\system32> [b]$x.Count[/b]
[b]970[/b]

 

PS C:\WINDOWS\system32> [b]$y = Get-ChildItem2 -Path 'D:\' -Recurse -EA 0 | Where-Object { $_.FullName.Length -gt 260 }[/b]
PS C:\WINDOWS\system32> [b]$y.Count[/b]
[b]1090[/b]

 

* PowerShell 5.1 and PowerShell Core 6.0.0 both returned the same number of results.

Edited by Arthur
Posted
An old cheat way I have used in the past is to map a drive to one of the sub folders and delete from there as your machine would then see it a Z:\Short instead of \\Server\Share\User\MassOfFolders.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...