0

One of my client's ftp server recently moved from Linux to Windows.

Searching using *.[cC][sS][vV] looks for *.csv and *.CSV files as intended on Linux.

enter image description here

But this doesn't work on Windows. Is there a way to expand this correctly on Windows or perform a case-insensitive search on Windows ftp server?

Vivek Vijayan
  • 337
  • 5
  • 19

1 Answers1

1

The FTP specification does not allow any filemasks.

While some FTP servers do support this, you cannot rely on this functionality, if your script has to be platform-independent.

The Windows IIS FTP server does not support file masks. Even if it did, it would not support the set syntax ([]), as that's not supported in Windows file masks in general.

See also Get File Listing ending with A or B using Jscape FTP.

You have to retrieve all files (without any mask) and filter them locally in your code/script.

Community
  • 1
  • 1
Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992