Every month I recieve a file with changing file name. It is a csv-file but due to the export system it has a changing file name every time it gets exported. Some examples:
XXXX.Traevbme
XXXX.Traevbme.XXXX
XXX.Traevbme.csv
The "Traevbme" is the only identifier that it is the right file and there are a lot of files with a similiar structure but a different identifier. I want to push this file to our MariaDB using pandas.to_sql. But that requires a fix path and file name. I tried to renaming it via a batch file but that only catched half the files. Is there any possible solutions using the os libarary or anything similiar? We only have a restricted amount of packages available to use, so maybe more common packages are suited best.
Furthermore, all of the exported files are placed in the same folder and its important to always take the newest of the "traevbme"-file so using the change or creation date as an extra identifier but my python skills are too poor to properly code this.
Because other files are exported to the same folder with varying export cylcles only using the latest file won't work
Thanks !