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!