CodePudding user response:
{Network Shared folder is also a path, such as "\ \ 192.168.1.88 \ my documents \ MM JPG", with local path principle is the same as
Use the following Stream method can be applied to LAZARUS, better compatibility
}
Procedure CopyFileByFileStream (SourceFilename, TargetFilename: String);
Var
FFrom fTo: tfilestream;
The begin
FFrom:=tfilestream. Create (SourceFilename fmOpenRead);
Try
FTo:=TFileStream. Create (TargetFilename fmOpenWrite or fmCreate);
Try
FTo. CopyFrom (fFrom, fFrom. Size);
The finally
FTo. Free;
end;
The finally
FFrom. Free;
end;
end;
CodePudding user response:
Direct copy network file convenient, but on the other computer systems, network Settings required is higher,If, and you are in, such as copying files between the server and the client, copy or use FTP, or through a socket to reproduce,
CodePudding user response:
Excuse me, great god, the writing you don't need to write a specific path?CodePudding user response:
If it is \ \ computername \ Shared name that don't require specific path, using a specific path needs to have the machine user permissions:Net use \ \ computername \... The password/user: XXX XXX
Copy \ \ computername \...
CodePudding user response:
@ echo offNet use \ \ 142.1.11.111 \ ipc $HB0011/user: Administrator & gt; Nul
Echo.
Xcopy/y \ \ 142.1.11.111 \ E $\ \ bin \ ZXGL center management system. The exe.
Net use \ \ 142.1.11.111 \ ipc $/delete & gt; Nul
BAT file content, only supplies the reference
CodePudding user response:
If the two machines can be setup, the simplest is himself a little use TCP file transfer program (also) to make serviceCodePudding user response:
My way, and in the local area network (LAN) :1, each computer to set up a Shared file directory,
2, transfer files to the server,
3, by the server to download file sharing,