🖥️ Batch (CMD)
Enable Win32 Long Paths (Batch)
Lifts the legacy 260-character MAX_PATH limit for apps that opt in (requires admin). Requires an elevated (Administrator) prompt. Applies the tweak via reg.exe.
SetEnableLongPaths.bat
@echo off
:: ============================================================
:: SetEnableLongPaths.bat
::
:: Enable Win32 Long Paths.
:: Lifts the legacy 260-character MAX_PATH limit for apps that opt in (requires admin). Requires an elevated (Administrator) prompt.
:: ============================================================
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem" /v "LongPathsEnabled" /t REG_DWORD /d "1" /f
if %ERRORLEVEL% EQU 0 (
echo Enable Win32 Long Paths applied.
) else (
echo Failed to apply tweak. Try running this script as Administrator.
)
pause