Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #16416

Downloading Multiple Files Via Import and FTP

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!news-out.readnews.com!news-xxxfer.readnews.com!newspump.sol.net!posts.news.twtelecom.net!nnrp3.twtelecom.net!not-for-mail
From Gregory Lypny <gregory.lypny@videotron.ca>
Newsgroups comp.soft-sys.math.mathematica
Subject Downloading Multiple Files Via Import and FTP
Date Mon, 13 Jan 2014 06:57:09 +0000 (UTC)
Sender steve@smc.vnet.net
Approved Steven M. Christensen <steve@smc.vnet.net>, Moderator
Message-ID <lb02o5$dn7$1@smc.vnet.net> (permalink)
Lines 26
Organization Time-Warner Telecom
NNTP-Posting-Date 13 Jan 2014 07:02:22 GMT
NNTP-Posting-Host b612dfb9.news.twtelecom.net
X-Trace DXC=S[43Cj?<eSQF`5M@]Oe7e\C_A=>8kQj6];[h;PUXBgbTb4gWQ>GE5;QEFiONJ7[GoVBOh?UcjbILZ
X-Complaints-To abuse@twtelecom.net
Xref csiph.com comp.soft-sys.math.mathematica:16416

Show key headers only | View raw


Hello everyone,

Mathematica's Import function works well for downloading single files from a remote computer using ftp, but it gets stuck when downloading anything more than about a 20 files in succession, even when those files are just few bytes.

If I define the path to a folder on my remote mac as

	ftpPath="ftp://user:password@domainName//filePath/=93

I can easily download a single file, myFile, using

	Import[ftpPath<>myFile, "CSV=94]

But if I try to download, say, 60 small files whose names are contained in myFileNames by mapping across the names (or by using Table)

	Import[ftpPath<> #, "CSV=94] &/@ myFileNames

I get two errors: (1) URLFetch::invhttp : Failure when receiving data from the peer; and (2) FetchURL::conopen.

I thought that maybe Mathematica was sending in the requests too quickly, so I tried slowing things down by inserting a one-second pause between each call to Import but that didn't help. Maybe I have to close a socket between each import but I don't know how to do that.

Anyone know of a fix?

Much obliged,

Gregory

Back to comp.soft-sys.math.mathematica | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Downloading Multiple Files Via Import and FTP Gregory Lypny <gregory.lypny@videotron.ca> - 2014-01-13 06:57 +0000
  Re: Downloading Multiple Files Via Import and FTP Roland Franzius <roland.franzius@uos.de> - 2014-01-15 08:39 +0000

csiph-web