Download Now

    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

    NameKindLine
    AllShellChangesconstant111
    TShellChangeenum98
    scCreateenum value98
    scDeleteenum value98
    scRenameenum value98
    scCreateFolderenum value98
    scDeleteFolderenum value98
    scRenameFolderenum value99
    scAttributesenum value99
    scUpdateFolderenum value99
    scUpdateItemenum value99
    scDriveAddenum value99
    scDriveRemoveenum value100
    scMediaInsertenum value100
    scMediaRemoveenum value100
    scFreeSpaceenum value100
    scAssociationsenum value100
    TShellChangeEventprocedural107
    TShellChangesset102
    TShellFileOperationclass44
    AddCopyprocedure58
    AddDeleteprocedure65
    AddMoveprocedure60
    AddNewFileprocedure69
    AddNewFolderprocedure67
    AddRenameprocedure62
    Clearprocedure56
    Copyfunction75, 76
    Createconstructor53
    Deletefunction83, 84
    Destroydestructor54
    Executefunction73
    Movefunction78, 79
    NewFolderfunction86
    Renamefunction81
    Abortedproperty88
    Countproperty90
    Optionsproperty93
    TShellFileOptionenum30
    foAllowUndoenum value30
    foNoConfirmationenum value30
    foNoConfirmMakeFolderenum value30
    foNoErrorUIenum value31
    foSilentenum value31
    foRenameOnCollisionenum value31
    foFilesOnlyenum value31
    foKeepNewerFileenum value31
    foPreserveExtensionsenum value32
    foShowElevationPromptenum value32
    foEarlyFailureenum value32
    TShellFileOptionsset34
    TShellLinkclass165
    Clearprocedure179
    Loadprocedure181, 183
    Resolvefunction191
    Saveprocedure185, 187
    Argumentsproperty194
    Descriptionproperty196
    FileNameproperty198
    HotKeyproperty201
    IconIndexproperty203
    IconLocationproperty205
    Showproperty207
    Targetproperty209
    WorkingDirectoryproperty211
    TShellLinkShowenum159
    lsNormalenum value159
    lsMaximizedenum value159
    lsMinimizedenum value159
    TShellNotifyclass119
    Createconstructor141
    Destroydestructor142
    Loadedprocedure138
    Activeproperty145
    Changesproperty147
    OnChangeproperty154
    Pathproperty150
    Recursiveproperty152
    WM_SHELLCHANGEconstant25