NOTE: This article only applies to English language versions of Windows.
The CACLS.EXE command line utility does not provide a /Y switch that automatically answers with Y for Yes to the ARE YOU SURE? Y/N prompt. However, you can use the echo command to pipe the character Y as input to the ARE YOU SURE? Y/N prompt when you call Cacls.exe in a batch file.
To programmatically answer with Yes to the ARE YOU SURE? Y/N prompt during batch file execution, use the following command line in your batch file:
In larger batch files, this may produce the following error before continuing to the next line:
As an alternative, you can create a dummy file with just a "y" in it and use the syntax:
Article ID: 135268 - Last Review: Feb 19, 2007 - Revision: 1