             Component: TFileOperation
               Version: 1.1
                Status: Freeware, Source code included
                Author: Chirag Dalal
                  Date: August 20, 1997
        Delphi version: 2.0, 3.0
Default component page: Win95

Task
----
  Performs a copy, move, rename or delete operation on a file system
  object. TFileOperation encapsulates the SHFileOperation() function
  provided as Shell API function with Microsoft Windows 95.

Properties
----------
* About: TStrings
    Read-only. Gives information on the component name, it's version,
    author, author's address and e-mail id.
* Active: Boolean
    Always False. Trying to set it to True executes the SHFileOperation()
    function to perform the required task.
* FilesFrom: string
    A string that contains the names to source files. Multiple files
    are separated by null (#0) or semi-colons ";" (semi-colons are
    converted to nulls before they are passed to SHFileOperation()).
* FilesTo: string
    A string that specifies the destination for the moved, copied
    or renamed file.
* Flags: TFileOpFlags
    (Taken from the Win32 Programmer's Reference)
    Flags that control the file operation. This can be a combination
    of the following values:

    fofAllowUndo         Preserves undo information, if possible.
    fofConfirmMouse      Not implemented.
    fofFilesOnly         Performs the operation only on files if a
                         wildcard filename (*.*) is specified.
    fofMultiDestFiles    Indicates that the FilesTo property specifies
                         multiple destination files (one for each
                         source file) rather than one directory where
                         all source files are to be deposited.
    fofNoConfirmation    Responds with "yes to all" for any dialog box
                         that is displayed.
    fofNoConfirmMkDir    Does not confirm the creation of a new directory
                         if the operation requires one to be created.
    fofRenameOnCollision Gives the file being operated on a new name
                         (such as "Copy #1 of...") in a move, copy or
                         rename operation if a file of the target name
                         already exists.
    fofSilent            Does not display a progress dialog box.
    fofSimpleProgress    Displays a progress dialog box, but does not
                         show the filenames.

* Operation: TFileOp
    Operation to perform. This member can be one of the following values:

    foCopy   Copies the files specified by FilesFrom to the location
             specified by FilesTo.
    foDelete Deletes the files specified by FilesFrom (FilesTo is ignored).
    foMove   Moves the files specified by FilesFrom to the location
             specified by FilesTo.
    foRename Renames the files specified by FilesFrom.

* OperationAborted: Boolean
    Set to True if the user aborted any file operation before they were
    completed.
* ProgressTitle: string
    String to use as the title for a progress dialog box. Used only
    when Flags includes fofSimpleProgress.

Methods
-------
* function Execute : Boolean
    Executes the SHFileOperation() function to perform the required
    task. Trying to set Active to True invokes this function. The return
    value is set to True if function succeeded. Note that this is
    different than the value of the OperationAborted property.
    The value in OperationAborted property is governed by user's
    action, while the return value of Execute method depends on
    the parameters passed to SHFileOperation().

Events
------
  (none)

Types
-----
* TFileOp = (foCopy, foDelete, foMove, foRename);
    Used by Operation property.

* TFileOpFlag = (fofAllowUndo, fofConfirmMouse, fofFilesOnly,
    fofMultiDestFiles, fofNoConfirmation, fofNoConfirmMkDir,
    fofRenameOnCollision, fofSilent, fofSimpleProgress);
* TFileOpFlags = set of TFileOpFlag;
    Used by Flags property.

Tips
----
* To delete files to Recycle Bin without asking for confirmation.
  Operation := foDelete;
  Flags := Flags + [fofAllowUndo, fofNoConfirmation];

* To suppress display of progress box.
  Flags := Flags + [fofSilent];

=============================================
 Limited warranty and disclaimer of warranty
=============================================
This software and accompanying written materials are provided
"as is" without warranty of any kind. Further, the author does
not warrant, guarantee, or take any representations regarding
the use, or the results of use, of the software or written
materials in terms of correctness, accuracy, reliability,
currentness or otherwise. The entire risk as to the results
and performance of the software is assumed by you.
Neither the author nor anyone else who has been involved in
the creation, production or delivery of this product shall be
liable for any direct, indirect, consequential or incidental
damages (including damages for loss of business profits, business
interruption, loss of business information and the like) arising
out of the use or inability to use the product even if the author
has been advised of the possibility of such damages.
By using the TFileOperation component you acknowledge that you have read
this limited warranty, understand it, and agree to be bound by its'
terms and conditions.

=====================================================================
If you have any comments, suggestions and bug-reports, please forward
it to chirag@theoffice.net
=====================================================================

=====================================
Name: Chirag Dalal
Address: 6/54, Varma Nagar,
         Old Nagardas Road,
         Andheri (East),
         Mumbai - 400 069,
         Maharashtra, India.
E-mail: chirag@theoffice.net
URL: http://www.theoffice.net/chirag/
=====================================

