• OpenCart Manager RSS
  • OpenCart Manager YouTube
  • Follow OpenCart Manager on Twitter
  • Google+
  • OpenCart Manager on Blogger
  • OpenCart Manager on FaceBook
8 AM - 7 PM (GMT) / 3 AM - 2 PM (EST)
0 votes, avg 0

Auto-Detect the Most Recent File from Directory and Import It to OpenCart

Taking into account the fact that there is no built-in import possibility, so considering the extension to mass add/update you have to think on different needs that might occur.

Store Manager for OpenCart, for instance, offers wide import functionality. The most popular features are:

- import from the files of multiple formats - CSV, XML, XLS, XLSX, ODS, TXT

- useful mapping feature that allows you to have your columns named differently than database fields

- use local and remote files that might be stored at your suppliers’ servers

- possibility to configure automated imports running on cron using addon

In this article we will describe one more situation where you will not go without Store Manager as its functionality might be really handy for you.

Task: Import the latest file local/remote directory into OpenCart dynamically

For example, your supplier put file with inventory changes for you into some folder at his server and sends you link with access details to get it. Each time, new file is added to that source directory and it contains in its name some variable part that holds the value of its creation date:




In case you have set up automated import, most likely you would like mass upload tool to pick up latest file instead of editing settings or asking provider to edit and replace the file with needed name each time he adds new one.

Even if your import sheets are stored locally and you can avoid re-naming them and make the most recent file of the folder to be detected dynamically.

Solution: Settings for picking the latest file from the folder

So what is the solution? How this can be done? The answer is by using special file ‘mask’ to substitute the variable part/name of file in Store Manager import settings.

  1. Launch Import/Export Wizard of Store Manager for OpenCart
  2. Choose path to local or remote directory and instead of file name or its variable part put ‘mask’ - in our case this will be asterisk symbol (*)

  3. Have a look at these examples:

    The most recent file added to local folder ‘Import’ at your PC.

    import latest file
    import latest file

    The latest file from remote server that starts with the word ‘products’.

    import latest file
    import latest file

  4. Move to the next step where you can preview the result.

Step-by-step import instructions check here -


Result: Directory contents is scanned and latest file is auto-picked.

This way your you can save these configured settings and use for automated imports without manual changes done.

Get latest file from the folder dynamically fetched instead of setting it manually!Import it FREE!

Privacy Preference Center

Strictly Necessary

These cookies are necessary fro the site ot function.

woocommerce_cart_hash, woocommerce_items_in_card, wp_woocommerce_session_{hash}


These are used to track user interaction and detect potential problems. These help us improve our services by providing analytical data on how users use this site.

_ga, _gid, _gat-_UA-326982215-25, LaSID, LaVisitorId, __utma, __utmc, __utmv, __utmz

Close your account?

Your account will be closed and all data will be permanently deleted and cannot be recovered. Are you sure?