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!