Reputation: 399
This command is to delete all files and sub-folders in a folder
rd /s "\\?\D:\TestFolder
This command snippet got from a youtube video right here
Could someone explain what this, \\?\
, does?
Upvotes: 0
Views: 495
Reputation: 41922
It's the prefix to bypass Windows path normalization. With it you'll be able to access paths that are not valid in Win32 namespace like names ending with .
or spaces: D:\TestFolder\folder ending with space \file name ending with dot.
, or files with path longer than MAX_PATH (260 characters in older Windows)
For file I/O, the
"\\?\"
prefix to a path string tells the Windows APIs to disable all string parsing and to send the string that follows it straight to the file system. For example, if the file system supports large paths and file names, you can exceed theMAX_PATH
limits that are otherwise enforced by the Windows APIs. For more information about the normal maximum path limitation, see the previous section Maximum Path Length Limitation.
See
Upvotes: 2