ftp connection

4 ビュー (過去 30 日間)
Misha
Misha 2012 年 2 月 23 日
Hey all,
I'm trying to download a file from the NWS ftp site: <ftp://tgftp.nws.noaa.gov/data/observations/metar>.
In the metar folder are .txt files from each reporting station.
I have:
f=ftp('tgftp.nws.noaa.gov');
dir(f, 'data/observations/metar/stations/KALB.TXT')
mget(f,'KALB.TXT','data/observations/metar/stations/');
i am perfectly able to navigate through all the folders and see that the file KALB.TXT is there. yet, when I attempt to execute the mget function, i get the error:
Error using ftp/mget (line 107)
File "KALB.TXT" not found on server.
Error in METAR_read (line 10)
mget(f,'KALB.TXT','data/observations/metar/stations/');
Any ideas? is this a syntax issue? something else? greatly appreciated, thanks! misha

採用された回答

Jarrod Rivituso
Jarrod Rivituso 2012 年 2 月 23 日
I get the same behavior you get. This works for me though...
f=ftp('tgftp.nws.noaa.gov');
cd(f,'data/observations/metar/stations')
mget(f,'KALB.TXT')

その他の回答 (1 件)

Misha
Misha 2012 年 2 月 23 日
that works for me as well. thanks!
i suppose that's the accepted work-around answer.
m

カテゴリ

Help Center および File ExchangeFTP File Operations についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by