From: chris on 9 Apr 2010 11:35 Hello. I have used Gunzip quite a lot before. never had this though. Have a website that has a large number (tens of thousands) of *CSV.GZ files on it in the form: http://mySite/myfile1.csv.GZ gunzip(url, myDesktop) When I try and use GUnzip I get the below error: The file works when I go to it in IE (asks me where do I want to save it as usual). The website is username and password protected. When I go download teh files through IE i only have to enter the password once; it then rememebers it from then on. I do not think GunZip has anyway of supporting password protected websites. In Matlab->File->Preferences->Web there are settings for password proxies. Could these be used? If gunzip can not be used, how can I just go to the website in matlab and download the large number of files as gz files and save them to my harddrive? That sounds simple but I cant see any functions to do it with Many Thanks!! ??? Error using ==> checkfilename>validateFilename at 134 Function GUNZIP was unable to read URL 'http://mywebsite/myFile.CSV.GZ'. Error in ==> checkfilename at 50 [fullfilename, fid] = validateFilename( ... Error in ==> gunzip>checkFilesURLInput at 93 [fullFileName, url] = checkfilename(inputFiles{1}, validExtensions, fcnName, ... Error in ==> gunzip at 59 [files, url, urlFilename] = checkFilesURLInput(files, {'gz'},'FILES',mfilename);
From: Nicholas Kinar on 9 Apr 2010 22:16 > I do not think GunZip has anyway of supporting password protected websites. > > In Matlab->File->Preferences->Web there are settings for password > proxies. Could these be used? > > If gunzip can not be used, how can I just go to the website in matlab > and download the large number of files as gz files and save them to my > harddrive? That sounds simple but I cant see any functions to do it with > Why not write an external shell script (.sh on UNIX or .bat on Windows) to download the files to a directory using the wget utility? Note that wget should be on your system if you use Linux; you can download and build wget for Mac OS X; and if you run Windows, you can obtain the wget utility through the GnuWin32 project (http://gnuwin32.sourceforge.net/). Here are some links detailing how to use wget with a password-protected site: http://www.ehow.com/how_2036474_wget-protected-files.html http://www.cyberciti.biz/faq/wget-command-with-username-password/ You can run the external script using the Matlab 'system' command (run 'help system' at the Matlab command-prompt. Then you can run gunzip on the files which have been downloaded into the folder by wget. HTH
|
Pages: 1 Prev: Undefined symbols when linking with R2010a on Mac OSX 10.6 Next: Registering CT images |