ftp script?

Does anyone know the best way I can pick up a data file from a Windows box (on a small LAN) in my program. I am using 6.21 NC.

I thought maybe write a simple ftp script and run this from the software but my script programming knowledge is very sketchy! Does anyone have a script like this they would be willing to share?

Also is this the best way to collect the data? I could write a TCP/IP server but I thought using ftp may be quicker solution.



if i try this script, it logs in fine - but stops after that and will not process the other commands until ftp is quit - so it doesnt work :

#! /bin/sh
ftp ftp://username:password@[IP_ADD]
get datafile.dat

you can use fs-cifs. & mount the windows folder on the qnx machine & acess the file as you would do normally in adirectory…

Thanks prit, that would be an ideal solution.

Do you have any tips on using fs-cifs?

if i try and run it like the examples

(the xp box is called HOME, with a shared folder ‘drex’ to share as ‘share’)

ie. [color=blue]fs-cifs //HOME: /share guest none

This will not work as cannot find fs-cifs. I get -

[color=blue]sh: fs-cifs: not found

If I try and run as a daemon, it starts but then I cannot mount with:

[color=blue]mount -t cifs -o guest,none [file://HOME:](file://HOME: /share

i get:

[color=blue]mount: cant mount /share (type cifs)
mount: Possible reason: No such device or address

Any suggestions appreciated.

get some.file

i do not know if this has any significance, but maybe you should drop the “file://” part of the command

i write it like this :
“mount -t cifs -o helge,none //think: /THINK”, whereas :
helge = user on WIN pc
think = name of WIN pc
10.0… = ip adress of WIN pc
C = name I attached to the C:\ drive on WIN pc
THINK = name of folder under qnx file manager

and it works
good luck ! Helge