访问 FTP 服务器上文件的属性
我想通过 url ftp.mysite.com 访问 ftp 服务器上名为 AH_store_20120117_00432.csv 的文件的属性。最后修改日期/时间、大小等属性。
我正在从批处理文件访问 ftp 服务器,如下所示:
@echo off
>ftp2.txt Echo open _ftp.mysite.com
>>ftp2.txt Echo username
>>ftp2.txt Echo password
>>ftp2.txt Echo cd dir1\dir2
>>ftp2.txt Echo quit
ftp -s:ftp2.txt
该文件存在于 dir2 中。 可以从上面的代码访问FTP站点,但不能访问文件属性。
请帮忙。 谢谢
I want to access properties of a file named AH_store_20120117_00432.csv at ftp server with url ftp.mysite.com. Properties such as last modified date/time,size, etc.
I am accessing ftp server from batch file as follows:
@echo off
>ftp2.txt Echo open _ftp.mysite.com
>>ftp2.txt Echo username
>>ftp2.txt Echo password
>>ftp2.txt Echo cd dir1\dir2
>>ftp2.txt Echo quit
ftp -s:ftp2.txt
The file is present in dir2.
FTP site can be accessed from above code, but not the file properties.
Kindly help.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
命令
dir
获取有关文件的一些信息对于批处理文件:
您将获得包含文件日期的记录列表。记录的格式可能因系统而异(RFC 959 - 文件传输协议)。
例如,Windows FTP 服务器可能会响应:
Linux 可能会响应:
command
dir
gets some info about filesFor your batch file:
You will get a list of the records included date of file. Format of the records may vary widely from system to system (RFC 959 - File Transfer Protocol).
For example Windows FTP server may response:
Linux may response: