請問如何複製檔案到別的目錄啊??? |
答題得分者是:gemi0305
|
lanfanra
一般會員 發表:48 回覆:51 積分:19 註冊:2003-08-06 發送簡訊給我 |
|
gemi0305
版主 發表:81 回覆:564 積分:629 註冊:2003-05-11 發送簡訊給我 |
CopyFile("C:\\a.txt", "C:\\Temp\\a.txt",false); BCB Online help:
The CopyFile function copies an existing file to a new file. 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 ); Parameters lpExistingFileName Points to a null-terminated string that specifies the name of an existing file. lpNewFileName Points to a null-terminated string that specifies the name of the new file. bFailIfExists Specifies how this operation is to proceed if a file of the same name as that specified by lpNewFileName already exists. If this parameter is TRUE and the new file already exists, the function fails. If this parameter is FALSE and the new file already exists, the function overwrites the existing file and succeeds. Return Values If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error information, call GetLastError. Remarks Security attributes for the existing file are not copied to the new file.國泰平安 發表人 - |
lanfanra
一般會員 發表:48 回覆:51 積分:19 註冊:2003-08-06 發送簡訊給我 |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |