loudogz
asked on
FILE FUNCTIONS: is there a function to copy a whole folder?
Hi,
I was just wondering if there is a function to copy a whole folder...I know there is CopyFile.
BOOL CopyFile(
LPCTSTR lpExistingFileName,
// pointer to name of an existing file
LPCTSTR lpNewFileName, // pointer to filename to copy to
BOOL bFailIfExists // flag for operation if file exists
);
But I can't find anything to copy a whole folder...
Thanks in Advance..
Lou
I was just wondering if there is a function to copy a whole folder...I know there is CopyFile.
BOOL CopyFile(
LPCTSTR lpExistingFileName,
// pointer to name of an existing file
LPCTSTR lpNewFileName, // pointer to filename to copy to
BOOL bFailIfExists // flag for operation if file exists
);
But I can't find anything to copy a whole folder...
Thanks in Advance..
Lou
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks, You da "Man"
system("xcopy /s...other options...args..");
You can also use CreateProcessEx() or something like that instead of system() but the net result is more or less the same.
Under unix the system("cp -r source... dest"); should work.
This was perhaps not the answer you were looking for but it does the job.
You can also use FindFirstFile()/FindNextFi
Alf