text
stringlengths
0
4.23k
Parameters
Parameter
Description
[<drive>:]<path>
Specifies the location and the name of the directory that you want to delete. Path is required. If you include a backslash () at the beginning of the specified path, then the path starts at the root directory (regardless of the current directory).
/s
Deletes a directory tree (the specified directory and all its subdirectories, including all files).
/q
Specifies quiet mode. Does not prompt for confirmation when deleting a directory tree. The /q parameter works only if /s is also specified.CAUTION: When you run in quiet mode, the entire directory tree is deleted without confirmation. Make sure that important files are moved or backed up before using the /q command-line option.
/?
Displays help at the command prompt.
[<drive>:]<path>
CAUTION: When you run in quiet mode, the entire directory tree is deleted without confirmation. Make sure that important files are moved or backed up before using the /q command-line option.
Remarks
You can't delete a directory that contains files, including hidden or system files. If you attempt to do so, the following message appears:
The directory is not empty
The directory is not empty
Use the dir /a command to list all files (including hidden and system files). Then use the attrib command with -h to remove hidden file attributes, -s to remove system file attributes, or -h -s to remove both hidden and system file attributes. After the hidden and file attributes have been removed, you can delete the files.
You can't use the rd command to delete the current directory. If you attempt to delete the current directory, the following error message appears:
The process can't access the file because it is being used by another process.
The process can't access the file because it is being used by another process.
If you receive this error message, you must change to a different directory (not a subdirectory of the current directory), and then try again.
Examples
To change to the parent directory so you can safely remove the desired directory, type:
cd ..
To remove a directory named test (and all its subdirectories and files) from the current directory, type:
rd /s test
To run the previous example in quiet mode, type:
rd /s /q test
rdpsign
Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012
Enables you to digitally sign a Remote Desktop Protocol (.rdp) file.
Note
To find out what's new in the latest version, see What's New in Remote Desktop Services in Windows Server.
Syntax
rdpsign /sha1 <hash> [/q | /v |] [/l] <file_name.rdp>
Parameters
Parameter
Description
/sha1 <hash>
Specifies the thumbprint, which is the Secure Hash Algorithm 1 (SHA1) hash of the signing certificate that is included in the certificate store. Used in Windows Server 2012 R2 and older.
/sha256 <hash>
Specifies the thumbprint, which is the Secure Hash Algorithm 256 (SHA256) hash of the signing certificate that is included in the certificate store. Replaces /sha1 in Windows Server 2016 and newer.
/q
Quiet mode. No output when the command succeeds and minimal output if the command fails.
/v
verbose mode. Displays all warnings, messages, and status.
/l
Tests the signing and output results without actually replacing any of the input files.
<file_name.rdp>
The name of the .rdp file. You must specify the .rdp file (or files) to sign by using the full file name. Wildcard characters are not accepted.
/?
Displays help at the command prompt.
<hash>
<hash>
<file_name.rdp>
Remarks
The SHA1 or SHA256 certificate thumbprint should represent a trusted .rdp file publisher. To obtain the certificate thumbprint, open the Certificates snap-in, double-click the certificate that you want to use (either in the local computer's certificates store or in your personal certificates store), click the details tab, and then in the Field list, click Thumbprint.
Note
When you copy the thumbprint for use with the rdpsign.exe tool, you must remove any spaces.
The signed output files overwrite the input files.
If multiple files are specified, and if any of the .rdp files can't be read or written to, the tool continues to the next file.