Rather than mucking about with Python or R you can easily batch-add the serial numbers to the filenames using "Advanced Renamer" (free from www.advancedrenamer.com).
The serial number is saved in the "Artist" tag prefixed with "AudioMoth "
So to add this use the "Add method"...
Add: <ExifTool:Artist>_
At index: 0
Alternatively, Advanced Renamer can read text directly from the file - so to add the serial number without the prefix you can use...
@AdrienGelle
Rather than mucking about with Python or R you can easily batch-add the serial numbers to the filenames using "Advanced Renamer" (free from www.advancedrenamer.com).
The serial number is saved in the "Artist" tag prefixed with "AudioMoth "
So to add this use the "Add method"...
Add: <ExifTool:Artist>_
At index: 0
Alternatively, Advanced Renamer can read text directly from the file - so to add the serial number without the prefix you can use...
Add: <File Content:107:16>_
At index: 0