MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: ftp from mathematica code

  • To: mathgroup at
  • Subject: [mg74813] Re: ftp from mathematica code
  • From: "Hans Michel" <hmichel at>
  • Date: Fri, 6 Apr 2007 04:21:14 -0400 (EDT)
  • References: <eusl95$9h0$><euvmc4$dfe$> <ev2bgk$klo$>

I Kantian:

What David Bailey refers to is an easily found Mathematica function called 
GetURL (Don't recall if it is built in or not).

I don't recall at which Mathematica version the Import command could fetch 
straight to a URI that is none local but in version 5.2 and possibly 5.1
Import["ftp..."] will do.

So for example
Will place the content of this readme file to the next output.

You can look up all the Import Options and how to assign the stream etc.

This is documented in "1.11.7 Exchanging Material with the Web" of the Help 

Additionally the website that David sent you to refers to how to configure 
your URI for a particular service type. It could be that the ftp site you 
require needs a user name and password if so follow the instructs at the 
site David supplied.

Also look up ImportString[], GetURL, and search this user group as this 
question has been asked. I just don't recall when.

For example again using the Microsoft ftp site

g = Import[

 Should show  a jpeg image.

GetURL has an older functionality meaning that in some version of 
Mathematica Import["ftp...."] will not work where as GetURL has been around 
since J/Link I think.
See here

Even without these function on Unix, Linux, DOS, ... if a command line ftp 
client was availble you could redirect output of the shell command to 


<ikantian at> wrote in message news:ev2bgk$klo$1 at
> Can you just give me the function, perhaps? & still don't exactly see
> how this would work getting a file from within Mathematica code.
> Thx.
> On Apr 4, 1:07 am, David Bailey <dave at> wrote:
>> ikant... at wrote:
>> > is it possible to ftp (get) a file from within either/both a
>> > mathematica notebook code or/and an m file code running on the command
>> > line (should be equivalent, right?).
>> > thx for any help.
>> My SuperWidgetPackage(SWP) (whose main purpose is to simplify the
>> creation of GUI's) contains a function GetURL that will do what you
>> want. If you need to quote a password, use the syntax described 
>> here:
>> The SWP can be downloaded for free from my website.
>> David Bailey

  • Prev by Date: Re: Probability Density Function
  • Next by Date: Re: N function problematic performance (V. 5.2)
  • Previous by thread: Re: ftp from mathematica code
  • Next by thread: Re: Re: ftp from mathematica code