I'm new to Pelles C and this forum. I was looking through some of the non-standard c functions. Is there one or does one exist in the forum to copy files? I've seen rename, delete and a few other very helpfull ones.
Thanks,
Ron
You can use API to do this quick routine:
int copyf(char copyfrom[], char copyto[])
{
SHFILEOPSTRUCT fileop;
fileop.hwnd = NULL;
fileop.wFunc = FO_COPY;
fileop.pFrom = copyfrom;
fileop.pTo = copyto;
fileop.fFlags = FOF_ALLOWUNDO|FOF_NOCONFIRMATION|FOF_NOCONFIRMMKDIR;
if( (SHFileOperation(&fileop)) != 0)
{
return 0;
}
return 1;
}
You should also need to include <windows.h>... i think :P
good luck!
jcarr
You can simply use Windows API CopyFile function.
See MSDN for more informations.