【问题标题】:Invalid command MDTM in iis ftpiis ftp 中的命令 MDTM 无效
【发布时间】:2021-11-18 00:56:18
【问题描述】:

我想获取 ftp 服务器上所有文件的时间戳。 它是 Windows 10 上的 iis ftp 服务器。 当我输入“?”在命令行提示符下,显示了以下列表

 ftp> ?
 Commands may be abbreviated.  Commands are:
 
 !               delete          literal         prompt          send
 ?               debug           ls              put             status
 append          dir             mdelete         pwd             trace
 ascii           disconnect      mdir            quit            type
 bell            get             mget            quote           user
 binary          glob            mkdir           recv            verbose
 bye             hash            mls             remotehelp
 cd              help            mput            rename
 close           lcd             open            rmdir

这里没有mdtm命令,虽然google说这个cmd是IIS6、IIS7年前添加的。 我该怎么办? 或者有没有 cmd 可以代替它?

【问题讨论】:

    标签: windows iis ftp rfc


    【解决方案1】:

    ? 是使用错误的命令,因为它打印出有关 Windows FTP 命令而不是 IIS FTP 服务器的帮助信息。

    你应该使用remotehelp,我多年前在this blog post 中写过。

    【讨论】:

    • 我试过remotehelp,MDTM已经列在屏幕上了。但是,当我在命令提示符下键入“MDTM a.txt”时,它显示“无效命令”
    • 那是因为你在 FTP 命令上下文中,所以你不能直接输入 FTP 服务器动词。试试literal MDTM a.txt
    • 你的意思是直接在命令提示符下而不连接到ftp? C:\Users\chrisqwer\Documents>MDTM a.txt 'MDTM' 不是内部或外部命令、可运行程序或批处理文件。
    • 不管怎样,我打算在 python 中尝试一下,看看它是否有效,谢谢 Lex。
    • @ChrisQWER “在 python 中”?那么使用原生 Python FTP 客户端支持会容易得多,例如 docs.python.org/3/library/ftplib.html 不要包裹命令,因为 Windows FTP 命令甚至不支持被动模式。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-12-31
    • 1970-01-01
    • 1970-01-01
    • 2016-07-05
    • 2017-10-04
    相关资源
    最近更新 更多