请教怎样
把一个文件从一个位置copy 另一个位置

解决方案 »

  1.   

    CopyFile
    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 
    Pointer to a null-terminated string that specifies the name of an existing file. 
    lpNewFileName 
    Pointer 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. Res
    Security attributes for the existing file are not copied to the new file. 
      

  2.   

    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
    );move file;
    MoveFile()
      

  3.   

    CopyFile( FileBeCopied , FileToCreate ,true/false);
    例如,
    要将c:\abc.txt 拷到 D:\ 下面!
    CopyFile( “c:\abc.txt”  , d:\abc.txt  ,true);
    true表示覆盖已有文件!
      

  4.   

    我还是有个问题我想用进度条来描述copy文件的进度
    应该怎么写