Reference Codebot.Windows.Shell.Tools.pas
Part of the Codebot Windows Shell package
The Codebot.Windows.Shell.Tools unit gives you non-visual components that use the Windows shell.
TShellFileOperation lets you copy, move, rename, delete, and create files and folders the way Windows Explorer does. Windows shows its progress dialog, asks the user about conflicts, and records your operations so the user can undo them in Windows Explorer. You can add operations with AddCopy, AddMove, AddRename, AddDelete, AddNewFolder, and AddNewFile and then perform them together with Execute, or perform one right away with Copy, Move, Rename, Delete, or NewFolder. With the foAllowUndo option, which is set by default, deleted items go to the recycle bin.
TShellNotify tells you about the changes Windows makes to files, folders, and drives through its OnChange event, such as items being created, deleted, or renamed, drives being added, or media being inserted. Set Path to the folder you want to watch, Recursive if you want to include its subfolders, and Active to start.
TShellLink lets you read and write shortcuts, the .lnk files of the desktop and the start menu. Set Target and the other properties and call Save, or call Load to read a shortcut. If the target of a shortcut was moved, Resolve can find it again.
Paths can be file system paths, shell parsing names, or known folders such as shell:Downloads. The unit is for Windows only.
Items 79 items
| Name | Kind | Line |
|---|---|---|
| AllShellChanges | constant | 111 |
| TShellChange | enum | 98 |
| scCreate | enum value | 98 |
| scDelete | enum value | 98 |
| scRename | enum value | 98 |
| scCreateFolder | enum value | 98 |
| scDeleteFolder | enum value | 98 |
| scRenameFolder | enum value | 99 |
| scAttributes | enum value | 99 |
| scUpdateFolder | enum value | 99 |
| scUpdateItem | enum value | 99 |
| scDriveAdd | enum value | 99 |
| scDriveRemove | enum value | 100 |
| scMediaInsert | enum value | 100 |
| scMediaRemove | enum value | 100 |
| scFreeSpace | enum value | 100 |
| scAssociations | enum value | 100 |
| TShellChangeEvent | procedural | 107 |
| TShellChanges | set | 102 |
| TShellFileOperation | class | 44 |
| AddCopy | procedure | 58 |
| AddDelete | procedure | 65 |
| AddMove | procedure | 60 |
| AddNewFile | procedure | 69 |
| AddNewFolder | procedure | 67 |
| AddRename | procedure | 62 |
| Clear | procedure | 56 |
| Copy | function | 75, 76 |
| Create | constructor | 53 |
| Delete | function | 83, 84 |
| Destroy | destructor | 54 |
| Execute | function | 73 |
| Move | function | 78, 79 |
| NewFolder | function | 86 |
| Rename | function | 81 |
| Aborted | property | 88 |
| Count | property | 90 |
| Options | property | 93 |
| TShellFileOption | enum | 30 |
| foAllowUndo | enum value | 30 |
| foNoConfirmation | enum value | 30 |
| foNoConfirmMakeFolder | enum value | 30 |
| foNoErrorUI | enum value | 31 |
| foSilent | enum value | 31 |
| foRenameOnCollision | enum value | 31 |
| foFilesOnly | enum value | 31 |
| foKeepNewerFile | enum value | 31 |
| foPreserveExtensions | enum value | 32 |
| foShowElevationPrompt | enum value | 32 |
| foEarlyFailure | enum value | 32 |
| TShellFileOptions | set | 34 |
| TShellLink | class | 165 |
| Clear | procedure | 179 |
| Load | procedure | 181, 183 |
| Resolve | function | 191 |
| Save | procedure | 185, 187 |
| Arguments | property | 194 |
| Description | property | 196 |
| FileName | property | 198 |
| HotKey | property | 201 |
| IconIndex | property | 203 |
| IconLocation | property | 205 |
| Show | property | 207 |
| Target | property | 209 |
| WorkingDirectory | property | 211 |
| TShellLinkShow | enum | 159 |
| lsNormal | enum value | 159 |
| lsMaximized | enum value | 159 |
| lsMinimized | enum value | 159 |
| TShellNotify | class | 119 |
| Create | constructor | 141 |
| Destroy | destructor | 142 |
| Loaded | procedure | 138 |
| Active | property | 145 |
| Changes | property | 147 |
| OnChange | property | 154 |
| Path | property | 150 |
| Recursive | property | 152 |
| WM_SHELLCHANGE | constant | 25 |