Whenever any file operation is being performed, such as move, rename, delete, or even copy/replace, a backup of that file (or multiple files) should be done into a separate identical structure.
Example
Let's say you're moving "Movies\XXX.mp4" to "Movies\XXX\XXX.mp4". First, a copy of the file will be saved to "BackupDir\Movies\XXX.mp4".
Notes
If another version of file is already backed up, then create a new copy of it with (1), (2), (3)... at the end.
Should also maintain a directory of backed up files.
Should have easy way to restore file, such as RestoreBackup('Movies\XXX.mp4'); which would copy said file back to its original location.
OPTIONAL - Perhaps also record history of which actions were done, and have mechanism to reverse or "undo" operations?
Goal
Whenever any file operation is being performed, such as move, rename, delete, or even copy/replace, a backup of that file (or multiple files) should be done into a separate identical structure.
Example
Let's say you're moving "Movies\XXX.mp4" to "Movies\XXX\XXX.mp4". First, a copy of the file will be saved to "BackupDir\Movies\XXX.mp4".
Notes
RestoreBackup('Movies\XXX.mp4');
which would copy said file back to its original location.