フィルターのクリア

Matlab FTP server client

2 ビュー (過去 30 日間)
Jack
Jack 2014 年 7 月 26 日
コメント済み: Star Strider 2014 年 7 月 26 日
I want download a specific file from FTP to my desktop so I used this code:
ftp_client = ftp('IP','Username','PASS');
mget(ftp_client,'/First_folder/WW.txt','F:/Target_Folder');
But when I use it, Matlab create a folder in F:/Target_Folder (with the name of First_folder) that contain WW.txt file. I want only have WW.txt in F:/Target_Folder without any folder in it. What should I do?
This is easy in URL style :
urlwrite('URL_Address/First_folder/WW.txt','F:/Target_Folder/TEXT.txt');
But when I use FTP I have this problem.
Thanks.

採用された回答

Star Strider
Star Strider 2014 年 7 月 26 日
I haven’t done this in a while. Perhaps using cd first will work:
cd(ftp_client, '/First_folder/');
mget(ftp_client,'WW.txt','F:/Target_Folder');
will work.
  2 件のコメント
Jack
Jack 2014 年 7 月 26 日
Thank you. That was a true answer.
Star Strider
Star Strider 2014 年 7 月 26 日
My pleasure!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDownloads についてさらに検索

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by