========================================= IDMCopy - Single and Multiple File Copier ========================================= Version 3.0 - Aug 1998 ====================== A. Introduction to IDMCopy. B. Changes and Addition. C. Installing into Delphi IDE. D. Methods. E. Properties. F. Events. G. You Like It - Order It. H. License Agreement. I. Disclaimer. =========================== A. Introduction to IDMCopy. =========================== IDMCopy was written and compiled using Delphi 3 and will work under this development enviroment. It is not known whether it will work under Delphi Versions 2 & 4. If users have success in use under these versions please let me know at idmccabe@globalnet.co.uk IDMCopy is an easy to use single or multiple file copy component. It enables the developer to easily copy files from one drive and directory to a new drive and directory with minimal code. IDMCopy can make use of a text file that holds the names of multiple files that require copying, and this requires no more code from the developer than if he was copying a single file. All properties of IDMCopy are available in designtime and runtime unless otherwise stated. IDMCopy comes in two forms, a restricted shareware version that will display a message detailing the fact that the component being used is sharware/trial and for use in the develpment enviroment only. And, a registered shareware version that will work unrestricted without a message. Last of all, I have made a quick adhock application that shows how to use the IDMCopy component, which shows the use of a statusbar with multiple panels for progress status, and the setting of other properties. All the Error events are as per the component but assigning your own events is only a double-click away. Check out the Demo.zip when you installed the IDMCopy component. ======================== B. Changes and Additions ======================== IDMCopy has undergone many changes since its small beginnings. It now has a total of 1 Method, 12 properties and 12 events. The following has changed since the last version of IDMCopy. 1. Hidden procedures have been added that confirms that the [CopyFrom] and [CopyTo] properties are set correctly. That being the character '\' at the end of each string. If the character is missing from the end of the string then the component will automatically append it to the end. Saving the developer and user the hassle of remembering to do it manually. 2. Hidden procedure added that checks that the [CopyFrom] and [CopyTo] properties exist and ready. It will check that the drive given in each property is valid. If either is not valid then an error message will be generated detailing the error. 3. Process reporting has been added in the form of additional events. By assigning something to each of the additional event will enable the developer to send some sort of progress message to the end user. The new events that allow this are: The actual code you place into each of the events will actually take place directly before the real process happens. (i.e. Assigning a StatusBar Text message for the [DuringFileCopy] event will show your statusbar message and then carry out the copying of that particular file within code.) a. [AfterCopySuccess] b. [AfterCopyFailed] c. [BeforeCopyNow] b. [DuringCheckCopied] e. [DuringCreateDir] f. [DuringFileCopy] ================================== C. Installing into the Delphi IDE. ================================== Install IDMCopy into the Delphi IDE as you would any other component. Click 'Component' - 'Install Component' Click the 'Browse' button of the Unit File name. Search your system until you find IDMCopy.DCU file. Click 'Ok' to install the component into the Delphi IDE. A new page titled 'IDM Tools' will be placed onto the VCL panel. =========== D. Methods. =========== IDMCopy has only one method that requires calling, and this sets everything into action. Method [IDMCopier.CopyNow] -------------------------- By calling this you will call the component to start the copy process and do any actions already set in motion by use of properties. ============== E. Properties. ============== IDMCopy has the following Properties which are available at designtime and during runtime. (Unless otherwise stated) Property [About] - Designtime only. ----------------------------------- This is a copyright notice and a notification of the authors email address should you wish to contact him. Property [CheckCopied] - Default of FALSE ----------------------------------------- When set to TRUE this will ensure that at the end of the copy process the component will double check to ensure that the file has been copied with success. If the copy failed an Error message will be generated (See Events). Property [CheckDestFree] - Default of TRUE ------------------------------------------ When set to TRUE this will make the component carry out a check to ensure that the file being copied is not too big for the destination [CopyTo] property. When set to FALSE no checking will take place. Property [CopyFrom] - Default of C:\ ------------------------------------ Here you enter the Disk Drive and Directory from which the file/s are to be copied from. Property [CopyTo] - Default of A:\ ---------------------------------- Here you enter the Disk Drive and Directory from which the file/s are to be copied to. Property [CreateDestDir] - Default of FALSE ------------------------------------------- When set to TRUE this will instruct the component to create the destination sub-directory in the [CopyTo] property if the sub-directory does not already exist. Note - It will only create Sub-Directories, it will not create multiple directories at this time. Property [Enabled] - Default of TRUE ------------------------------------ When set to FALSE this will totally disable the component and an error message will be generated informing the user that copying is not enabled. Property [FileListName] - Default of *.Txt ------------------------------------------ Here you enter the filename of a text file that lists all of the files that you wish copied. The designation must include the Drive Letter\Sub-Directories\ and Filename.Ext - i.e. 'C:\MyProgram\Files.Txt' Note - The file extention can be what ever you want so long as it is a Text File. (i.e. *.idm *.plc *.txt) This [FileListName] file will only be used if [FileListUse] is TRUE. Property [FileListUse] - Default of FALSE ----------------------------------------- When FALSE the component will only copy the single filename given in the [FileName] property. But when TRUE it will use the [FileListName] property to select a text file that lists each file that requires copying. Note - When set to TRUE it will ignore the [FileName] property. Property [FileName} - Default of *.* ------------------------------------ This property is used by the developer when copying a single file from the [CopyFrom] directory to the [CopyTo] directory. It is also used by the component when copying files given in the [FileListName]. Property [Name] - Default of IDMCopier1 --------------------------------------- The name that you will use to access IDMCopy properties and the like. Property [OverWrite] - Default to FALSE --------------------------------------- When set to FALSE the component will not overwrite any existing files in the destination location that has the same name as the source files and an error message will be generated. When set to TRUE the component will automatically overwrite existing files in the destination directory if they are the same as the source filenames. ========== F. Events. ========== The following Events are available to the developer. All the events have default error messages if nothing is assigned. Event [AfterCopyFailed] ----------------------- This event will be called if after the entire process has completed it reports that one of the processes of copying the file in question failed - It will only be called if you assign something to this event. Event [AfterCopySuccess] ------------------------ This event will be called if after the entire process has completed it reports that everything worked fine and as expected. - It will only be called if you assign something to this event. Event [BeforeCopyNow] --------------------- This event will be called before anything begins when [CopyNow] method has been called. - It will only be called if you assign something to this event. Event [DuringCheckCopied] ------------------------- This event will be called when the file has been copied and it is now checking that it was successfull in its copying. - It will only be called if you assign something to this event. Event [DuringCreateDir] ----------------------- This event will be called when you have set [CreateDestDir] property to TRUE. - It will only be called if you assign something to this event. Event [DuringFileCopy] ---------------------- This event will be called when you have or the component has assigned a name to the [FileName] property during [ListFileName] copy process. - It will only be called if you assign something to this event. Event [OnFileExists] -------------------- This event will be called if [OverWrite] property is set to FALSE and the file being copied already exists in the destination [CopyTo] property. Event [OnFileFailedCopy] ------------------------ This event will be called if [CheckCopied] property is set to TRUE and the file being copied was unsuccessful. i.e. It failed to copy properly. Event [OnFileListMissing] ------------------------- This event will be called if the [FileListUse] property is set to TRUE and the component can not find the Text File specified in the [FileListName] property. Event [OnFileMissing] --------------------- This event will be called if the component can not find the file listed in the [FileName] property, or in the case of [FileListUse] property use, when the component can not find the filename listed in the [FileListName] property. Event [OnNoDestDir] ------------------- This event will be called if [CreateDestDir] property is set to FALSE and the [CopyTo] property does not exist. Note - Remember that IDMCopy can only create a sub-directory of those directories that already exist. It can not create multiple directories. Event [OnNoDestSpace] --------------------- This event will be called if [CheckDestFree] property is set to TRUE and the file being copied is too big for the destination [CopyTo] property. ======================== G.You Like It - Order It ======================== If you like the component and think it will be of great and easy use within your application then please order a copy from me. The copy you will receive will run outside of the Delphi IDE and will not interfere with the running of your application apart from the described events for error messages. To order the IDMCopy component email me at idmccabe@globalnet.co.uk requesting purchase of the IDMCopy component. The price of the component is £10 (UK Sterling pounds) and can only be paid by cash, UK Cheque or UK Postal Order made payable to I D McCabe. All details will be given when the request for IDMCopy component is received. ==================== H. License Agreement ==================== This component is Shareware. You can freely distribute copies of the main archive as long as no alterations are made to the contents and no charge is raised except a reasonable fee for distributing costs. You are hereby granted the permission to use IDMCopy for a period of 30 days (from first use on) for evaluation purposes. If you use this component after that, you are required to register. Note that the unregistered version of this component will not work outside DELPHI IDE. Register by emailing for the ordering form and then paying UK£ 10 to the author. The UK£ 10 registration fee will license one copy for use on one computer. You must treat this component like a book that cannot be read by two different persons at the same time. Registered users will get a fully functional version as well as subsequent minor version upgrades via e-mail. Please understand that it's not possible to deliver this component on floppy disk. ======================= I. DISCLAIMER AGREEMENT ======================= This software has been thoroughly tested. Nevertheless it is provided "as is" and without any warranties expressed or implied, including, but not limited to, implied warranties of merchantability and fitness for a particlar purpose. Any liability of the author, Ian D McCabe, will be limited exclusively to product replacement or refund of the product purchase price. In no event shall the author be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use this software or documentation, even if the author has been advised of the possibility of such damages.