Solved Recover Deleted Movie Files From Backup - Robocopy
Hello all,

I know this is strictly not a Kodi question but as I managed to deleted a massive bunch of data from my data source am thinking that others may have done the same and been in my boat.

I have a Win 7 box which I use as my primary storage and my Kodi device accesses over SMB.

I was running a cleanup of data with ember media manager and I managed to deleted every single trailer file for my movies.

To a degree and luckily I use robocopy to mirror my files to another Win 7 box. So for the moment they are safe and sound there.

This robocopy was created in case of a major melt down or if the primary Win 7 box or drives failed and I never thought I'd be an idiot an delete and whole bunch of data from each move folder.Confused

My folder structure is like this on the primary Win 7 box

E:\StreamFiles\Movies\Movies\12 Angry Men (1957)
E:\StreamFiles\Movies\Movies\30 Minutes or Less (2011)

I map the primary Win 7 E: as S: on my backup Win 7 box and run this command on the backup box

robocopy "S:" "E:\StreamFiles" /E /MIR

Since running my cleanup on ember I have lost every file with the word trailer in it


12 Angry Men (1957)-trailer.mkv
30 Minutes or Less (2011)-trailer.mpg

I'm looking for a new script to copy back only the missing file with the word "-trailer" to it's original/primary location. My web searching is not showing much. Have found some scripts which will copy all missing files back to another single folder. As I'm talking about 100's of files here would prefer not to do this manually. Wink

Any kind robocopy gurus out their to advise on the correct command that can:

Copy missing trailers files back to the original location from the backup and if possible also keep the existing time stamp?

Thanks heaps in advance and saving me from a bit of a nightmare.

Confusion is just a state of mind.
Could this site be of any help

good luck

I might be missing something obvious here, but does it have to be with robocopy?
I use freefilesync to make semi-manual backups (I backup manually to multiple drives then run FFS every now and again) and syncing folders / drives to restore missing files would be fairly trivial using that.
If both file structures are identical then, using Windows Explorer, you could simply "copy" your backup movie directory to your original Movie directory.

Then when Windows advises "...a file with that name exists..." Choose "do nothing" (or whatever the wording is). Windows will then ignore all existing files and only copy the missing files.
If all you want to do is copy back files with "trailer" in the filename, I'd try something like...

robocopy "S:" "E:\StreamFiles" *trailer*. * /E

I'd not use /MIR as that would delete things from E of they were not present in S, and I'm not sure that's what you want.
Thanks for the speedy responses guys, much appreciated.

After I settled down after the "ohh sh*t!!" moment it was quite in fact easy to recover.

On the backup box I ran this robocopy command:

robocopy "E:\StreamFiles" "S:" *)-trailer* /E

So it is just a reversal of the main backup direction and only copying files with )-trailer in the name.

After some thorough testing this script is now running recovering my trailers and date/timestamps are the same as before as well Smile

Thanks again
Confusion is just a state of mind.
Thread Rating:
  • 0 Vote(s) - 0 Average

Logout Mark Read Team Forum Stats Members Help
Recover Deleted Movie Files From Backup - Robocopy00