Titus Information Systems, Inc.

Standard Library
CFileCopy Class

This class gives the application an efficient method of copying or installing multiple files from and/or to the same location.  If destination files are in use, they may be set to install on the next workstation restart.  This class may be instantiated to provide file copy services.  The public member functions are as follows:

CFileCopy::CFileCopy()
This is the constructor.  It initializes the data members.
BOOL CFileCopy::Source(CString path)
This member function is called to store the directory (folder) that is the source (from) of files that need copying.  All files that are copied by this class, except for the CFileCopy::Send() member function, will originate from the directory specified in path.
BOOL CFileCopy::Destination(CString path)
This member function is called to store the directory (folder) that is the destination (to) of files that need copying.  All files that are copied by this class will be placed in the directory specified in path.
BOOL CFileCopy::Copy(CString name)
This member function copies the specified file from the source directory (folder) to the destination directory.  The file will be copied using the same name for the destination file as the source.
BOOL CFileCopy::Copy(CString input, CString output)
This member function copies the specified input file from the source directory (folder) to the destination directory using the output file name.
BOOL CFileCopy::Send(CString input, CString output)
This member function copies the specified input file to the destination directory (folder) using the output file name.  The input file must have the full path specified.
BOOL CFileCopy::Install(CString name, BOOL*Restart)
This member function determines whether or not the specified file needs to be copied by checking the versions of the file in both the source and destination directories (folders).  Please note that files copied using this member function must be compatible with the GetFileVersionInfo() windows API function.  If the destination file already exists, it will be renamed with a .BAK extension rather than being overwritten.  If the destination file is in use, Restart will be set to TRUE, and the actual file copy will take place on the next computer restart.
BOOL CFileCopy::Install(CString input, CString output, BOOL*Restart)
This member function determines whether or not the specified file needs to be copied by checking the versions of the input file in the source directory (folder) and the output file in the destination directory.  Please note that files copied using this member function must be compatible with the GetFileVersionInfo() windows API function.  If the destination file already exists, it will be renamed with a .BAK extension rather than being overwritten.  If the destination file is in use, Restart will be set to TRUE, and the actual file copy will take place on the next computer restart.


[ CBinaryFile | TCommandLineInfo | CCommaFile | TDateCtrl | CDDE | CDdeClient | CDdeServer ]
[ CDirectoryLocator | CDirectoryDialog | CDirectoryFind | CDirectoryNew | TFrameWnd ]
[ InterfaceExcel | CMaintFn | CPrintFile | CProcDialog | TPrintDialog | CProcPropertyPage ]
[ CProgress | CRegistry | CSDisCreate | CSDisFile | CSDisPage | CSDisView | CTableFile ]
[ CTaskIcon | TPresent | TTime | TDate | TDateTime | CTransferData | TWinApp | CXlTable ]

[ Stand-alone Programs | Standard Library | Conversion Functions | Utility Functions | COBOL Functions ]
[ Windows NT Library | COBOL Library | COBOL Interface | Command Prompt Abbreviations | Purchase Instructions ]

[ Home | Areas of Expertise | "We Do Windows" | Clients and Projects | Software Samples | Package Software Available ]
[ Contact Information | Business Software Philosophy | Church Software Philosophy ]
All contents of this web site are Copyright © Titus Information Systems, Inc., Phoenix, Arizona, U.S.A.