Example content
Open current folder
- abbreviate
ii .
Reveal one file or folder
Copy using Windows Explorer UI
- from
$source
to$destination
with$copyFlags
The $copyFlags
are a bitwise combination of the following vOptions
flags:
0x0004
: no UI, Do not display a progress dialog box.0x0008
: rename duplicates, Give the file being operated on a new name in a move, copy, or rename operation if a file with the target name already exists.0x0010
: yes to all, Respond with “Yes to All” for any dialog box that is displayed.0x0040
: allow undo, Preserve undo information, if possible.0x0080
: require wildcard, Perform the operation on files only if a wildcard file name like*.*
is specified.0x0100
: UI without filenames, Display a progress dialog box but do not show the file names.0x0200
: create directories, Do not confirm the creation of a new directory if the operation requires one to be created.0x0400
: no error UI, Do not display a user interface if an error occurs.0x0800
: no security attributes, Do not copy the security attributes of the file. (Version 4.71.)0x1000
: no recursion, Only operate in the local directory. Do not operate recursively into subdirectories.0x2000
: no file grouping, Do not copy connected files as a group. Only copy the specified files. (Version 5.0.)
Value | Summary | Description |
---|---|---|
0x0004 = 4 | no UI | Do not display a progress dialog box. |
0x0008 = 8 | rename duplicates | Give the file being operated on a new name in a move, copy, or rename operation if a file with the target name already exists. |
0x0010 = 16 | yes to all | Respond with “Yes to All” for any dialog box that is displayed. |
0x0040 = 64 | allow undo | Preserve undo information, if possible. |
0x0080 = 128 | require wildcard | Perform the operation on files only if a wildcard file name like *.* is specified. |
0x0100 = 256 | UI without filenames | Display a progress dialog box but do not show the file names. |
0x0200 = 512 | create directories | Do not confirm the creation of a new directory if the operation requires one to be created. |
0x0400 = 1024 | no error UI | Do not display a user interface if an error occurs. |
0x0800 = 2048 | no security attributes | Do not copy the security attributes of the file. (Version 4.71.) |
0x1000 = 4096 | no recursion | Only operate in the local directory. Do not operate recursively into subdirectories. |
0x2000 = 8192 | no file grouping | Do not copy connected files as a group. Only copy the specified files. (Version 5.0.) |
Example: combine create directories, no error UI and rename duplicates
Sources:
- 2022-09-02: Copying Files In PowerShell - Using Windows Explorer UI - BackSlasher
- 2022-09-02: Folder.CopyHere method (Shldisp.h) - Win32 apps - Microsoft Docs
Related:
Tags:
File System - Use paths, get meta data, link, download, and encrypt files and folders