MATLAB 帮助中心
删除 SFTP 或 FTP 服务器上的文件夹
rmdir(s,folder)
rmdir(s,folder) 将指定的文件夹从与 s 相关联的 SFTP 或 FTP 服务器上的当前文件夹中删除。folder 必须为空。
s
folder
示例
全部折叠
连接到 FTP 服务器并删除该服务器上的一个文件夹。此示例显示 ftp.example.com(实际上并不存在的计算机)上的一个假想 FTP 会话。如果您拥有 FTP 服务器帐户,有权在该服务器上上传或更改文件,则可以像本例中一样使用 rmdir 函数。
ftp.example.com
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
从 FTP 服务器上删除 pub 文件夹。
pub
rmdir(s,'pub')
在 FTP 服务器上显示更新后的内容。
myscript.m README.txt
与 SFTP 或 FTP 服务器的连接,指定为 SFTP 对象或 FTP 对象。
要删除的远程文件夹,指定为字符向量或字符串标量。
在 R2006a 之前推出
cd | delete | dir | ftp | mkdir | sftp
cd
delete
dir
ftp
mkdir
sftp
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处