【问题标题】:ftp *.[cC][sS][vV] not working as intended on Windowsftp *.[cC][sS][vV] 在 Windows 上无法正常工作
【发布时间】:2017-03-07 16:18:06
【问题描述】:

我客户的一个 ftp 服务器最近从 Linux 迁移到了 Windows。

使用*.[cC][sS][vV] 搜索会按照 Linux 上的预期查找 *.csv 和 *.CSV 文件。

但这在 Windows 上不起作用。有没有办法在 Windows 上正确扩展它或在 Windows ftp 服务器上执行不区分大小写的搜索?

【问题讨论】:

    标签: linux windows ftp


    【解决方案1】:

    FTP 规范不允许使用任何文件掩码。

    虽然某些 FTP 服务器确实支持此功能,但如果您的脚本必须独立于平台,则您不能依赖此功能。

    Windows IIS FTP 服务器不支持文件掩码。即使支持,它也不支持 set 语法 ([]),因为 Windows 文件掩码通常不支持。

    另见Get File Listing ending with A or B using Jscape FTP

    您必须检索所有文件(不带任何掩码)并在您的代码/脚本中本地过滤它们。

    【讨论】:

      猜你喜欢
      • 2020-08-04
      • 2016-04-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-09-01
      • 2021-01-14
      • 2021-10-30
      • 1970-01-01
      相关资源
      最近更新 更多