Link to home
Start Free TrialLog in
Avatar of Celina Sisi
Celina Sisi

asked on

How to Send a text file from PC to another one

Hello,i wish that you are fine
My problem is that i want to send a text file from my computer to another one using Delphi 7 how can i do this please
thanks.
Avatar of Manuel Lopez-Michelone
Manuel Lopez-Michelone
Flag of Mexico image

Are you talking to send a file between two computers connected thru serial port or how?
share a directory on the dest and then copy the file to that share
or use the drive$

call the copyfile  function from the windows unit
https://msdn.microsoft.com/en-us/library/windows/desktop/aa363851(v=vs.85).aspx

if you want it with progress, use copyfileex
https://msdn.microsoft.com/en-us/library/windows/desktop/aa363852(v=vs.85).aspx

sample:
if CopyFile(PChar('c:\temp\test.txt'), PChar('\\othercomputer\c$\temp\test.txt'), False) then 
  ShowMessage('File copied to dest');

Open in new window

This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.