Using Importlogs.py on Windows to import multiple log files help

Does any know how to import multiple log file using windows. I need to import several months for several websites.

Hi does anyone have any ideas for this thanks Ross

I too am very interested in this. We are looking to migrate away from Google Analytics and are looking to evaluate your log analytics as it seems to fit our requirements. However, without the ability to easily import historic IIS log files for a number of sites on a load balanced environment could be a deal breaker. Can anyone advise? Thanks.

What have you tried and what wasn’t working? To import multiple files it should be enough to put the list of files as a parameter (space delimited) to the program.

Matthieu we have just tried a wildcard * if enter full name of 1 log file it works, we cannot add multiple log files in a line (space delimited) as this will be very time consuming.

On Linux (or more precisely in most shells) when you enter rm * this gets expanded by the shell to rm file1 file2 file3 and the program that is called never sees the wildcard and just the list of files.
Because of this you can use /var/log/apache2/access* with importlogs.py and it just works (as the python script never notices that you used a wildcard).

I haven’t used Windows in years, so I know little about it, but according to command line - Is there any way to get the windows cmd shell to expand wildcard paths? - Super User this is not the case in cmd.exe and one would need to rewrite the script to do this. As I can’t do this, you would need to do a pull request on GitHub - matomo-org/matomo-log-analytics: Import any kind of server logs in Matomo for powerful log analytics. Universal log file parsing and reporting.

Parse logs for Matomo (Piwik) on Windows [using Powershell] – Realhe.ro blog should do what you need here.

Lukas thanks will do.

dhealy thanks I’ll take a look.