• OpenCart Manager RSS
  • OpenCart Manager YouTube
  • Follow OpenCart Manager on Twitter
  • Google+
  • OpenCart Manager on Blogger
  • OpenCart Manager on FaceBook
1-855-814-4511
8 AM - 7 PM (GMT) / 3 AM - 2 PM (EST)
1-855-810-5797
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:

products05-21-2015.csv,

products05-22-2015.csv,

products05-22-2015.csv


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.


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


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

Step-by-step import instructions check here -

https://www.opencartmanager.com/useful-articles/opencart-product-management/opencart-product-import/



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!