Examples:
Add Read-Only permission to a single file
CACLS myfile.txt /E /G "Power Users":R
Add Full Control permission to a second group of users
CACLS myfile.txt /E /G "FinanceUsers":F
Now revoke the Read permissions
from the first group
CACLS myfile.txt /E /R "Power Users"
Now give the first group Full-control:
CACLS myfile.txt /E /G "Power Users":F
Give the Finance group Full Control of a folder and all sub folders
CACLS c:\docs\work /E /T /C /G "FinanceUsers":F
“Whether a pretty woman grants or withholds her favours, she always likes to be asked for
them” ~ Ovid (Ars Amatoria)
CALL
Call one batch program from another, or call a subroutine.
Syntax
CALL [
drive:][
path]
filename [
parameters
]
CALL :
label [
parameters
]
CALL
internal_cmd
Key:
pathname The batch program to run.
parameters Any command-line arguments.
:
label Jump to a label in the current batch script.
internal_cmd Run an
internal
command, first
expanding any variables
in the argument.
“My mother never saw the irony in calling me a son-of-a-bitch” ~ Jack Nicholson
CD
Change Directory - Select a Folder (and drive)
Syntax
CD [/D] [
drive:][
path]
CD [..]
Key
/D : change the current DRIVE in addition to changing folder.
CHDIR is a synonym for CD.
Chia sẻ với bạn bè của bạn: