comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Starting ftp from IDl
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Starting ftp from IDl [message #11610] Fri, 24 April 1998 00:00
thompson is currently offline  thompson
Messages: 584
Registered: August 1991
Senior Member
Martin Fuhrer wrote:
>
> Hi IDL Experts
>
> I'm writing an IDL application and I want to create a button which
> starts a ftp-based file transfer automatically. The address of the
> host and the user name can be hardwired somewhere in the code.
> I've tried to start ftp from the command line and I got the following
> error message:
> IDL> $ftp myhost
> (myhost::myuser:) login: Access of user wdenied.
>
> Any hint on how to implement this feature is very appreciated by

We've addressed this exact same question. This is the approach we've taken.
An IDL procedure writes out a temporary shell script containing the proper
commands, e.g.

#!/bin/csh
cd /mydir
ftp -n << done remote.computer.address
user username password
cd /mydir
ascii
put my.file "my.file"
quit
done

Then we spawn the commands

SPAWN, "source temporary.file", junk
SPAWN, "rm temporary.file", junk

William Thompson
Re: Starting ftp from IDl [message #11612 is a reply to message #11610] Fri, 24 April 1998 00:00 Go to previous message
David Foster is currently offline  David Foster
Messages: 341
Registered: January 1996
Senior Member
Martin Fuhrer wrote:
>
> Hi IDL Experts
>
> I'm writing an IDL application and I want to create a button which
> starts a ftp-based file transfer automatically. The address of the
> host and the user name can be hardwired somewhere in the code.
> I've tried to start ftp from the command line and I got the following
> error message:
> IDL> $ftp myhost
> (myhost::myuser:) login: Access of user wdenied.
>
> Any hint on how to implement this feature is very appreciated by

I believe the problems you are having are due to insufficient
access rights for ftp on the server. I can do:

IDL> $ftp host

with no problems. If you put the file .netrc in your home
directory then you can connect without having to type username/pwds.
This file can include, among other things, lines like:

machine your-host login your-username password your-password

I recommend getting XFTP, a great gui ftp utility that is very
easy to use, and allows recursive transfers of directory structures.
You could SPAWN this program from within IDL:

spawn, 'xftp', /noshell, pid=pid

Note that IDL will be suspended until you quit the program. The
keyword PID returns the process ID of the program. The /NOSHELL
keyword is for UNIX only.

You can get XFTP from:

http://www.llnl.gov/ia/xftp.html

Hope this is useful.

Dave
--

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
David S. Foster Univ. of California, San Diego
Programmer/Analyst Brain Image Analysis Laboratory
foster@bial1.ucsd.edu Department of Psychiatry
(619) 622-5892 8950 Via La Jolla Drive, Suite 2240
La Jolla, CA 92037
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: idl process id
Next Topic: Re: Satellite Image Data-Map Projection Question

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 20:02:33 PDT 2025

Total time taken to generate the page: 0.01502 seconds