how to do sequence for this case (alphabet)
Información
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
Mostrar comentarios más antiguos
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');
Respuestas (1)
Fangjun Jiang
el 3 de Dic. de 2011
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 comentarios
Matmien
el 4 de Dic. de 2011
Fangjun Jiang
el 4 de Dic. de 2011
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.
La pregunta está cerrada.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!