# Python3 code to rename multiple # AudioMoth files in a directory import os from datetime import datetimedef main(): files = [file for file in os.listdir('.') if file.endswith('.WAV')] for file in files: timestamp = int(file.replace('.WAV', ''), 16) destination = datetime.utcfromtimestamp(timestamp).strftime('%Y%m%d_%H%M%S.WAV') os.rename(file, destination)if __name__ == '__main__': main()
Code is here also:
# Python3 code to rename multiple # AudioMoth files in a directory import os from datetime import datetime def main(): files = [file for file in os.listdir('.') if file.endswith('.WAV')] for file in files: timestamp = int(file.replace('.WAV', ''), 16) destination = datetime.utcfromtimestamp(timestamp).strftime('%Y%m%d_%H%M%S.WAV') os.rename(file, destination) if __name__ == '__main__': main()