text stringlengths 0 4.23k |
|---|
To schedule automatic file checking on the D volume, but not the C or E volumes, type the following commands in order: |
chkntfs /d |
chkntfs /x c: d: e: |
chkntfs /c d: |
Important |
The /c command-line option is accumulative. If you type /c more than once, each entry remains. To ensure that only a particular volume is checked, reset the defaults to clear all previous commands, exclude all volumes from being checked, and then schedule automatic file checking on the desired volume. |
choice |
Prompts the user to select one item from a list of single-character choices in a batch program, and then returns the index of the selected choice. If used without parameters, choice displays the default choices Y and N. |
Syntax |
choice [/c [<choice1><choice2><…>]] [/n] [/cs] [/t <timeout> /d <choice>] [/m <text>] |
Parameters |
Parameter |
Description |
/c <choice1><choice2><…> |
Specifies the list of choices to be created. Valid choices include a-z, A-Z, 0-9, and extended ASCII characters (128-254). The default list is YN, which is displayed as [Y,N]?. |
/n |
Hides the list of choices, although the choices are still enabled and the message text (if specified by /m) is still displayed. |
/cs |
Specifies that the choices are case-sensitive. By default, the choices are not case-sensitive. |
/t <timeout> |
Specifies the number of seconds to pause before using the default choice specified by /d. Acceptable values are from 0 to 9999. If /t is set to 0, choice does not pause before returning the default choice. |
/d <choice> |
Specifies the default choice to use after waiting the number of seconds specified by /t. The default choice must be in the list of choices specified by /c. |
/m <text> |
Specifies a message to display before the list of choices. If /m is not specified, only the choice prompt is displayed. |
/? |
Displays help at the command prompt. |
<choice1><choice2><…> |
[Y,N]? |
<timeout> |
<choice> |
<text> |
Remarks |
The ERRORLEVEL environment variable is set to the index of the key that the user selects from the list of choices. The first choice in the list returns a value of 1, the second a value of 2, and so on. If the user presses a key that is not a valid choice, choice sounds a warning beep. |
1 |
2 |
If choice detects an error condition, it returns an ERRORLEVEL value of 255. If the user presses CTRL+BREAK or CTRL+C, choice returns an ERRORLEVEL value of 0. |
255 |
0 |
Note |
When you use ERRORLEVEL values in a batch program, you must list them in decreasing order. |
Examples |
To present the choices Y, N, and C, type the following line in a batch file: |
choice /c ync |
The following prompt appears when the batch file runs the choice command: |
[Y,N,C]? |
To hide the choices Y, N, and C, but display the text Yes, No, or Continue, type the following line in a batch file: |
choice /c ync /n /m "Yes, No, or Continue?" |
Note |
If you use the /n parameter, but do not use /m, the user is not prompted when choice is waiting for input. |
To show both the text and the options used in the previous examples, type the following line in a batch file: |
choice /c ync /m "Yes, No, or Continue" |
To set a time limit of five seconds and specify N as the default value, type the following line in a batch file: |
choice /c ync /t 5 /d n |
Note |
In this example, if the user doesn't press a key within five seconds, choice selects N by default and returns an error value of 2. Otherwise, choice returns the value corresponding to the user's choice. |
2 |
cipher |
Displays or alters the encryption of directories and files on NTFS volumes. If used without parameters, cipher displays the encryption state of the current directory and any files it contains. |
Syntax |
cipher [/e | /d | /c] [/s:<directory>] [/b] [/h] [pathname [...]] |
cipher /k |
cipher /r:<filename> [/smartcard] |
cipher /u [/n] |
cipher /w:<directory> |
cipher /x[:efsfile] [filename] |
cipher /y |
cipher /adduser [/certhash:<hash> | /certfile:<filename>] [/s:directory] [/b] [/h] [pathname [...]] |
cipher /removeuser /certhash:<hash> [/s:<directory>] [/b] [/h] [<pathname> [...]] |
cipher /rekey [pathname [...]] |
Parameters |
Parameters |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.