How do I display ftp activity in the command window (and filter for a string)
이전 댓글 표시
I am connecting to a tape drive using the ftp command in the instrument control toolbox. After running tests on the tape drive, I ftp a file from the drive. When I ftp to the drive from a DOS window and issue the get command, some messages are displayed.
ftp> get myfile.dmp
200 PORT command successful.
226 Data transfer complete.
1589020 bytes received in 0.5seconds 3002.10 kBytes/sec ftp>
In Matlab, I issue the command: mget(aft, 'myfile.dmp'); (aft is my ftp object) and the file transfers ok, but I do not see any messages in the command window. If I leave off the ';' at the end, I get 'ans = [1x80 char]' in the command window. ans is the full path name of the file received.
I want to incorporate this into a function and need to detect that the transfer has completed before trying to access the data in the file, and before issue a command for the tape drive to proceed to the next step.
댓글 수: 5
Walter Roberson
2011년 4월 21일
If you ask for a file that doesn't exist with mget(), what does ans come out as?
Walter Roberson
2011년 4월 21일
If you ask for multiple files and one of them doesn't exist, how does that show up?
Elaine
2011년 4월 22일
Walter Roberson
2011년 4월 22일
That showed up.
Did you happen to quote a line by using " at the beginning and end of it? If so then you hit a bug in the system that causes everything else to be discarded. Same thing happens if you have a line that has ' at the beginning and end of it.
Elaine
2011년 4월 22일
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Instrument Control Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!