Skip to content

Instantly share code, notes, and snippets.

@cwlls
Created January 14, 2019 14:25
Show Gist options
  • Save cwlls/74d7c7fca86a6b411019985cc7d5dbf6 to your computer and use it in GitHub Desktop.
Save cwlls/74d7c7fca86a6b411019985cc7d5dbf6 to your computer and use it in GitHub Desktop.
Rename files downloaded from Arlo (Netgear) to something more parsable by humans
#!/usr/bin/python
import os
import sys
import datetime as datetime
for file in os.listdir(sys.argv[1]):
ts = datetime.fromtimestamp(float(os.path.splitext(file)[0])/1000.0)
os.rename(file, ts.strftime("%m%d%Y-%H%M%S.mp4"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment