重命名 SFTP 或 FTP 服务器上的文件 |
您所在的位置:网站首页 › matlabselect函数 › 重命名 SFTP 或 FTP 服务器上的文件 |
连接到 FTP 服务器并重命名该服务器上的文件。此示例显示 ftp.example.com(实际上并不存在的计算机)上的一个假想 FTP 会话。如果您拥有 FTP 服务器帐户,有权在该服务器上上传或更改文件,则可以像本例中一样使用 rename 函数。 首先,连接到服务器。 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 服务器上的文件。 rename(s,'README.txt','INTRO.txt')在 FTP 服务器上显示更新后的内容,包括重命名的文件。 dir(s) INTRO.txt myscript.m pub |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |