20. Fetch and Import Most Recent File into Magento

If you are updating data in your Magento shop considerably often via export/import, then you most likely have somewhere the folder with all those spreadsheets.


If you used to keep all old files you have ever imported or received during export (like majority of shopkeepers in fact:), then must be there has gathered the massive list of spreadsheets. So sometimes it becomes really hard to find the necessary one in the directory.

The Most Recent File

This turns into a real challenge when you need to create an import configuration with settings (e.g. for automated data appending) and include the latest file with data, especially when it is updating regularly.


You may need to import the latest file from the folder and might not remember its exact title or supplier each day provides a new file for you to update your catalog and it is named differently, for example, magento02-04-2022.csv, magento02-05-2022.csv, etc.


Then you need to manually and routinely pick up files for import and change import settings if you have them saved. But what to do when the spreadsheet is placed at remote FTP and you cannot change its name?


Auto-Select Latest File from Directory

Do you want to use the import system to determine what's the newest file? You have the chance to avoid the necessity to modify the date or re-name the import file if you are using Store Manager for Magento.


You have to know one simple hint on how to set up import in the way for it to fetch recent files from a certain directory.


1) Open Import/Export Wizard of Store Manager for Magento

2) At the step of selecting the import source file indicate the path to its location and instead of the filename or instead of the variable part of the spreadsheet title put an asterisk symbol [*].


Let’s view the examples.

If you need the recent file from the folder ‘Magento files’ placed on your PC, you indicate the following path:

C:\Users\Magento files\*.csv

This way the most recent file from that folder will be selected.


If you have an HTTP or FTP link to the file location and if your files differ by date (magento02-04-2022.csv, magento02-05-2022.csv), you can indicate the following path:

http://yoursuppliersite.com/magento*.csv

So instead of the date in the file name, you use the [*] and this will let the software know that it should pick the latest by date file to import it.

Now, you can proceed to the next import settings. Check here to find the step-by-step guide

Zipped file

Very often when data files are big, they got zipped for easier and faster information sending. So if you have got is zipped file, you should not worry - the Store Manager for Magento will handle it. The software will detect and unpack the file and use the data for import.


Use Store Manager for Magento to automatically fetch a recent file and upload it, no matter if it is stored locally or placed at remote FTP.