JSI Tip 1556. How do I use CACLS in batch?

The CACLS utility does not support a /Y switch to answer Yes to the ARE YOU SURE? Y/N prompt.

In tip 0971, we used the < c:\yes.txt syntax.

You can also use the following syntax to answer Y:

echo y| cacls <filename> /g <username>:<permission>

NOTE: There is no space between the y and the | (pipe).

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish