rmdir
SFTP または FTP サーバー上のフォルダーの削除
説明
例
フォルダーの削除
FTP サーバーに接続して、サーバー上のフォルダーを削除します。この例では、ftp.example.com
(実在しないマシン) での架空 FTP セッションが示されています。ユーザーが FTP サーバー上にアカウントをもち、FTP サーバー上でファイルをアップロードまたは変更する権限がある場合、この例で示すように関数 rmdir
を使用できます。
最初に、サーバーに接続します。
s = ftp('ftp.example.com')
FTP with properties: Host: "ftp.example.com" Username: "anonymous" Port: 21 ServerLocale: "en_GB" DirParserFcn: @matlab.io.ftp.parseDirListingForUnix Mode: "binary" LocalDataConnectionMethod: "passive" RemoteWorkingDirectory: "/"
FTP サーバー上の現在のフォルダーの内容を表示します。
dir(s)
myscript.m README.txt pub
pub
フォルダーを FTP サーバーから削除します。
rmdir(s,'pub')
FTP サーバーの更新された内容を表示します。
dir(s)
myscript.m README.txt
入力引数
s
— SFTP または FTP サーバーへの接続
SFTP オブジェクト | FTP オブジェクト
SFTP または FTP サーバーへの接続。SFTP オブジェクトまたは FTP オブジェクトとして指定します。
folder
— リモート フォルダー
文字ベクトル | string スカラー
削除するリモート フォルダー。文字ベクトルまたは string スカラーとして指定します。
バージョン履歴
R2006a より前に導入
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)