Take the 2-minute tour ×  We need to set permissions on users'
directories on a Windows 2000 Server. This happens regularly
enough and they must also be set in the order below or the
backups crap out. This is the basic script:  XCACLS foldername
/g Administrators:OF /T /C /Y   XCACLS foldername /E /g
"DOM\Enterprise Admins":OF /T /C /Y   XCACLS foldername /E /g
SYSTEM:OF /T /C /Y   XCACLS foldername /E /g
STAFF\username:ORWEDC /T /C /Y  My problem is that this script
doesn't work on all files in some directories. The files it
seems to fail on are long filenames and deeply nested
directories.  Does anyone know of a script that doesn't mind
long filenames and takes large paths in its stride?  I have come
across a XCACLS.vbs script from Microsoft, but it works
differently and I'm not sure if it works with these large
filenames also.  share|improve this question  1 Answer 1  There
is a limit of around 260 characters on the length of filenames,
however there is a massively cunning and sneaky way to get round
this