SECFileSystem::CopyFiles

BOOLSECFileSystem::CopyFiles(const CString&FileSpec, const CString&DestPath, const BOOLbIgnoreErrors= FALSE, const unsigned longeFileAttrib= normal)

Copies more than one file to another subdirectory.

Defined in: filesys.cpp

Return Value

Nonzero if successful; 0 if an error occurred.

Parameters

FileSpec

Name of the files to copy (with wildcards).

DestPath

Name of the directory to copy the files to.

Comments

To copy a set of files based on a wildcard file specification.

Example

BOOL bRetVal = fs.CopyFiles("c:\\foo\\bar\\*.txt", "c:\\foo2");

bIgnoreErrors

Ignore errors when copying files.

eFileAttrib

The file attributes filter of files to copy (See  Attribute).

Developer Notes

If an error occurs and bIgnoreErrors is FALSE, the copy is aborted. There is no way to know if any of the files were copied. Even if you are ignoring errors (i.e., bIgnoreErrors = TRUE), the return value indicates whether an error occurred.

If a destination file exists, an error occurs.

See Also

SECFileSystem  CopyFile  DeleteFiles  Attribute