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
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 for business Windows Server User experience Other
5 answers
Sort by: Most helpful
-
Itzik Dahan 11 Reputation points
2021-03-03T08:56:31.463+00:00 -
GerhardK 6 Reputation points
2021-03-03T08:44:45.37+00:00 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. -
Jenny Feng 14,241 Reputation points
2021-03-04T07:44:29.753+00:00 @Itzik Dahan
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.):- Download Windows 10 and Windows Server 2016 specific administrative templates – or .admx files.
- 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).
- 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.
- 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. -
Itzik Dahan 11 Reputation points
2021-03-04T10:10:33.18+00:00 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 -
Kadir Kalkan 1 Reputation point
2021-03-07T16:43:25.687+00:00 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.logIf you help i would be glad.
Best Regards.