How to Use CACLS.EXE in a Batch FileLast reviewed: September 23, 1996Article ID: Q135268 |
The information in this article applies to:
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:
echo y| cacls <filename> /g <username>:<permission>NOTE: Do not type a space between the "y" and the pipe symbol (|), otherwise, CACLS.EXE fails to make the permission changes.
|
KBCategory: kbgeneral
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |