Skip to content

Python script (Windows\Linux?) to back up (save) modified date times (timestamps) for all files including those in subfolders in a directory with the ability to later restore them from the saved state file

Notifications You must be signed in to change notification settings

Owyn/backup_file_timestamps

 
 

Repository files navigation

Backs up (saves) modified dates (timestamps) for all files including those in subfolders in a directory with the ability to later restore them from the saved state, might be useful for cloud backup software and services which don't support restoring file timestamps when getting your files back

Requirements:
Python 3+ (2 is fine too if you don't have unicode-named files)

Usage:
backup-file-timestamps.py - uses current directory to go and save timestamps
backup-file-timestamps.py -save "C:\my folder" - save modified time dates inside C:\my folder and its subfolders
backup-file-timestamps.py -restore "C:\my folder" - restores modified time dates for all files inside C:\my folder and its subfolders

Console-less usage (GUI):

Navigate to shell:sendto (enter into explorer's address bar)
image

and place two .bat files there (or shortcuts to them, doesn't matter) after editing those with notepad to have the correct path pointing to your backup-file-timestamps.py file where you placed it after saving)
image

after that you can simply click "send to" in context menu on a folder
image

About

Python script (Windows\Linux?) to back up (save) modified date times (timestamps) for all files including those in subfolders in a directory with the ability to later restore them from the saved state file

Resources

Stars

Watchers

Forks

Languages

  • Python 96.9%
  • Batchfile 3.1%