how to do sequence for this case (alphabet)
情報
この質問は閉じられています。 編集または回答するには再度開いてください。
古いコメントを表示
This command just for one file
ftpsite=ftp('website','username','password'); cd(ftpsite, 'ISK1/Hourly/210'); mget(ftpsite, 'isk1210b.zip'); unzip('isk1210b','C:\Multipath3SGU\MultipathMapping3SGU');
How i get more file with sequence command
cd(ftpsite, 'ISK1/Hourly/210');
mget(ftpsite, 'isk1210a.zip');
mget(ftpsite, 'isk1210b.zip');
mget(ftpsite, 'isk1210c.zip');
mget(ftpsite, 'isk1210d.zip');
mget(ftpsite, 'isk1210e.zip');
mget(ftpsite, 'isk1210f.zip');
mget(ftpsite, 'isk1210g.zip');
mget(ftpsite, 'isk1210h.zip');
mget(ftpsite, 'isk1210i.zip');
mget(ftpsite, 'isk1210j.zip');
mget(ftpsite, 'isk1210k.zip');
mget(ftpsite, 'isk1210l.zip');
mget(ftpsite, 'isk1210m.zip');
mget(ftpsite, 'isk1210n.zip');
%NEXT............................................ cd(ftpsite, 'ISK1/Hourly/220');
mget(ftpsite, 'isk1220a.zip');
mget(ftpsite, 'isk1220b.zip');
mget(ftpsite, 'isk1220c.zip');
mget(ftpsite, 'isk1220d.zip');
mget(ftpsite, 'isk1220e.zip');
mget(ftpsite, 'isk1220f.zip');
mget(ftpsite, 'isk1220g.zip');
mget(ftpsite, 'isk1220h.zip');
mget(ftpsite, 'isk1220i.zip');
mget(ftpsite, 'isk1220j.zip');
mget(ftpsite, 'isk1220k.zip');
mget(ftpsite, 'isk1220l.zip');
mget(ftpsite, 'isk1220m.zip');
mget(ftpsite, 'isk1220n.zip');
0 件のコメント
回答 (1 件)
Fangjun Jiang
2011 年 12 月 3 日
One way to do it, construct your file names in the for-loops
for k={'1210','1220'}
for j='a':'n'
FileName=strcat('isk',k,j,'.zip')
mget(ftpsite,FileName);
end
end
2 件のコメント
Matmien
2011 年 12 月 4 日
Fangjun Jiang
2011 年 12 月 4 日
You can see that the FileName is certainly correct. Try run the command mget(ftpsite, 'isk1220n.zip') at the command line. It you can get the file, then I would try adding a pause(n) statement after the mget() in the for-loop. n means n seconds which you can try and error to find the best value.
この質問は閉じられています。
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!