关于局域网中的文件COPY?(20分)

  • 主题发起人 主题发起人 6bytes
  • 开始时间 开始时间
6

6bytes

Unregistered / Unconfirmed
GUEST, unregistred user!
一台机器上隐射了F盘为隔壁那台(名为cg2)的c盘,请问如何将F:/下的一个A.TXT拷贝到
本地的C盘上
 
当作本地文件处理就可以了。
CopyFile('f:/a.txt','c:/a.txt',false);
 
Ctrl-c
Ctrl-V
 
二楼的是对的。
请看DELPHI的帮助:
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.

 
多人接受答案了。
 
后退
顶部