Forcing writability of a directory on Windows

Following on this previous post, this short DOS script does the equivalent of chmod a+wS:


@echo off
REM    forcewritable.cmd
REM    Usage: Open an Administrator command prompt and run this, e.g.,
REM    forcewritable C:\path\to\folder
echo Taking ownership of %1...
takeown /f %1 /r /d y
icacls %1 /grant Everyone:F /t

One thought on “Forcing writability of a directory on Windows”

Leave a Reply

Your email address will not be published. Required fields are marked *