Can I use a wildcard in the filename when pulling the inventory file from an FTP or SFTP server?

In the Data Feed settings of EZ Inventory, you can use the variable {{ * }} in the filename portion of the file path to search the list of files on the FTP/SFTP server for a partial match.

For example, you might want to update your inventory every 1 hour, and your supplier also generates a new file every 1 hour but they include the full timestamp including the minute and second of when the file was generated in the filename.  We can match the current hour here, but not the minute and second.

The folder/directory on the FTP/SFTP server might have a list of files that looks like this:

  • stock_20230205_170132.csv
  • stock_20230205_180117.csv
  • stock_20230205_190059.csv

In EZ Inventory, under the "File Path" setting, the merchant can then enter this value: 

  • /ezinventory/stock_{{ YYYY }}{{ MM }}{{ DD }}_{{ HH }}{{ * }}.csv

This will cause the app to pull the file that starts with stock_ + the current date and hour and ends with .csv.

If there are multiple files in the directory matching the same pattern, our app will sort the filenames in descending order and then retrieve the first result.

Related Articles:

App: EZ Inventory

Tags: advanced features, ftp, sftp, inventory feed