[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: [sqr-users] using ftp from sqr



Tam,
     This is not going to work as each system command will create a new Shell 
to run single commands. 
 
I suggest you try this. 
 
begin-procedure create-ftp-file
       open '/tmp/ftpcmds' as 1 for-writing
       encode '<013>' into $enter 
      let $cmd = 'open unix_box' || $enter || 'user user_id user_password' || 
$enter 
      let $cmd = $cmd || 'cd  /dirone/dirtwo/dirthree' || $enter || 'put 
hello.txt' || $enter || 'bye' 
      write 1 from $cmd 
 
     
 
     call system using 'ftp -nvi < /tmp/ftpcmd' #stat 
end-procedure 
 
or 
 
Create a Unix Scrip as follow after doing 
$> vi ftpcmds 
open unix_box 
user user_id user_password 
cd /dir 
put hello.txt 
bye 
 
save the above file 
and then in sqr 
 
call system using 'ftp -nvi < ftpcmds ' #stat 
 
HTH 
Datta. 

tam kag <kaghdot@hotmail.com> wrote:
Hello,

Im working on a project where i need to FTP a file to a unix box

this is the code that I have tried, any info well be helpfull

I'm FTPing to a unix box from a unix box

the code:
call system using 'ftp -n unix_box' #stat
call system using 'user userid userpassword' #stat
call system using 'cd /dirone/dirtwo/dirthree' #stat
call system using 'put hello.txt' #stat



Thank you



_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users