question

ItzikDahan-4347 avatar image
0 Votes"
ItzikDahan-4347 asked RonnieMorgan commented

Enable support for a max path length

Hi I have Windows Server 2019 and I need to enable support for a max path length. (The Default is 260 length) I set the registry " LongPathsEnabled " to "1" at HKLM\SYSTEM\CurrentControlSet\ControlFileSystem and also enable long path support via Group Policy Computer Configuration > Administrative Templates > System > Filesystem. Enable the policy Enable NTFS long paths. but still, I get the error "the file names would be too long for the destination folder" when I try to create a subfolder longer than 260 length Thanks in Advanced

windows-server
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@ItzikDahan-4347
Hi,

Just checking in to see if the information provided was helpful.

If the reply helped you, please remember to accept as answer.
If no, please reply and tell us the current situation in order to provide further help.

0 Votes 0 ·
GerhardK avatar image
0 Votes"
GerhardK answered

Are you using File Explorer when creating the subfolder? If so, try creating the folder using PowerShell. I had a similar issue and ended up scripting the process.
Hope that helps.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ItzikDahan-4347 avatar image
1 Vote"
ItzikDahan-4347 answered GerhardK commented

Hi,
Thank you For your quick replay
We are working with a Document management system that already has a few TB of files. so it is not an option for me to start to create those directories. and also all the process of saving the fileד is from the software

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I'm just spitballing here but would it be possible to change the path(s) the system uses to paths that use symbolic links to technically shorten the path? something like mklink /d c:\link “C:\reallylongpath”

0 Votes 0 ·
JennyFeng-MSFT avatar image
0 Votes"
JennyFeng-MSFT answered RonnieMorgan commented

@ItzikDahan-4347
Hi,
You could configure the Enable Win32 long paths setting for the NTFS file system, through Group Policy.
You need to be able to set up this GPO using administrative templates (.admx) for Windows Server 2019.
Folow these steps(Also for Windows Server 2019.):
1. Download Windows 10 and Windows Server 2016 specific administrative templates – or .admx files.
2. Install the downloaded .msi file Windows 10 and Windows Server 2016 ADMX.msi on a supported system. You also need user rights to run the Group Policy Management Editor (gpme.msc), or the Group Policy Object Editor (gpedit.msc).
3. The administrative templates are installed in C:\Program Files (x86)\Microsoft Group Policy\Windows 10 and Windows Server 2016, or whatever directory you provided during the installation. Copy over the entire folder PolicyDefinitions to your Primary Domain Controller’s SYSVOL\domain\Policies directory.
4. Verify you’ve copied the folder, and not just the files. The full path is: SYSVOL\domain\Policies\PolicyDefinitions. This is explained in Microsoft’s Technet article Managing Group Policy ADMX Files Step-by-Step Guide.

Start your Group Policy Management console and click through to the location where you want to add the GPO. Create a new GPO: Create a GPO in this domain, and Link it here..., and provide your GPO with a relevant name.
In the Settings tab, right click and choose Edit…. Now under Computer Configuration in the Group Policy Management Editor, click through to Policies > Administrative Templates > System > Filesystem. Configure and enable the Setting Enable Win32 long paths.

Then run gpupdate in an elevated cmd.exe command prompt.

Hope above information can help you.

============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I've done all of that, and even the registry key the OP set, and it's still not working. Even tried rebooting.

I have a Windows Server 2012 file server that doesn't have this issue, and I'm trying to moving everyone over to a new Windows Server 2019 file server. But I can't until I get this figured out. Do you have any other ideas as to why I can't disable this limit?

0 Votes 0 ·
ItzikDahan-4347 avatar image
0 Votes"
ItzikDahan-4347 answered ItzikDahan-4347 commented

Hi,
In Windows 2019 server you alredy have this setting, you don't need to download this ADMX
I set this setting and still, it is not working

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Did you reboot?

0 Votes 0 ·

Yes, sure

0 Votes 0 ·
KadirKalkan-5162 avatar image
0 Votes"
KadirKalkan-5162 answered KadirKalkan-5162 published

Hi, I have same issue about angular universal. When i am trying to build my project with prerendering option it throws that exception below. I have 30.000+ url and everyone create another folder and that's blocked by windows. i changed regedit and also tried with windows powershell to run command but the problem didn't solve.

Note: When i decrease this 30.000+ folder it works perfectly so the problem is related by the folder count, i'm sure about that.

The Exception :

An unhandled exception occurred: spawn ENAMETOOLONG
See "C:\Users\ADMINI~1\AppData\Local\Temp\ng-cTzJoX\angular-errors.log" for further details.
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file C:\Windows\system32\cmd.exe
npm ERR! errno ENOENT
npm ERR! apex-admin@10.0.0 prerender: ng run matngular:prerender
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the apex-admin@10.0.0 prerender script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache_logs\2021-03-07T13_42_50_492Z-debug.log

If you help i would be glad.

Best Regards.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.