kvk1989 2 Posted March 26 hi , can someone tell me what's the best method for get file from another pc (legal way) ? see this video i attached here thanks ! have a good day Video_2024-03-26_172705.mp4 Share this post Link to post
FPiette 383 Posted March 26 You should better describe your needs because as is the answer is very simple: copy \\share\filepath localfilepath. Copy is the command line interpreter command. You can implement it in Delphi using Windows CopyFile API (https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-copyfile). Or using standard Defli file I/O (preferably using TFileStream). Share this post Link to post
kvk1989 2 Posted March 27 10 hours ago, FPiette said: You should better describe your needs because as is the answer is very simple: copy \\share\filepath localfilepath. Copy is the command line interpreter command. You can implement it in Delphi using Windows CopyFile API (https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-copyfile). Or using standard Defli file I/O (preferably using TFileStream). So this method work over the internet? Or in tcp , ftp required server IP address? Share this post Link to post
FPiette 383 Posted March 27 6 hours ago, kvk1989 said: So this method work over the internet? Or in tcp , ftp required server IP address? I told you to better describe your needs. Copy or CopyFile is Windows and it works whatever the physical network is between the two computers provided windows networking is running. TCP is a low level protocol that Windows Network use to implement his communication protocol (Which by the way is also implemented in Linux using SAMBA). FTP is a higher level protocol, making use of TCP to exchange files between two sites. IP address is the way to identify a computer inside a TCP/IP network. And there are many many more things that we cannot mention here (It would become a huge article). That's why you need to describe your needs. Share this post Link to post
Remy Lebeau 1396 Posted March 27 16 hours ago, kvk1989 said: So this method work over the internet? No. Using a share path only works on the local LAN network, and only if the file is exposed by the server to the LAN via a UNC share to begin with. If you want to copy a file over the Internet, you need to setup a suitable TCP server for that, such as an HTTP or FTP server. 1 Share this post Link to post