LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How can i call FTP dos command in LabWindows CVI??

Hi Experts,

Actually i'm trying to transfer a file from a pc to another via LAN using ftp command in dos.
I tried to called ftp command from LabWindow CVI as follow:

system("ftp -n pcname < GetFile.txt");

where the content of GetFile.txt is as follow:

user ftp password
put filename.txt
bye


However, the file transfer is not successful....
I have tried out by typing each command line from the text file in the DOS command window and the file transfer is successful.
Can anyone tell me if i have missed out anything??

Thanks in advance...
0 Kudos
Message 1 of 2
(3,317 Views)
You need to use the -s option for ftp, i.e.

system("ftp -n -s:GetFile.txt pcname")

ftp -? for a list of options

HTH, HAND,
Martin.
--
Martin
Certified CVI Developer
0 Kudos
Message 2 of 2
(3,317 Views)