Renamed all my files to the same file (700 files lost)

Any questions? Need some help?
Post Reply
christoffdt
Posts: 4
Joined: 29 Sep 2016, 18:46

Renamed all my files to the same file (700 files lost)

Post by christoffdt »

So I used

Code: Select all

filebot -script fn:amc --output "C:/Users/username/Downloads/series" --log-file amc.log --action move --conflict override -non-strict "C:/Users/username/Downloads/new series/" --def music=y subtitles=en artwork=y  "seriesFormat= C:/Users/username/Downloads/Series/{n.replaceTrailingBrackets().replace(':',' -')} ({y})/{'Season '+s}/{n.replace(':',' -')} - {s00e00} - {t.replace(':',' -').replaceAll(/[?]/, '').replaceAll(/[`´‘’\"ʻ]/, \"'\") .lowerTrail().replacePart(', Part $1')}" "movieFormat = C:/Users/username/Downloads/Flieks/{n.replaceAll(/:/, ' -').replace(/?/, '')} ({y}) ({certification}) IMDB {rating}/{n.replaceAll(/:/, ' -').replace(/?/, '')} ({y}){' CD'+pi}{'.'+lang}" "musicFormat=C:/Music/{n}/{fn}" clean=y excludeList=amc.log
from the command line in Windows 10 and it renamed all my files in that folder to "Downloads.mkv" and "Downloads.srt" in my C:\Users\username folder, which means that it wrote over the same file a bunch of times.

This means that I lost over 700 files, which took me a month to download and would take forever to find again and redownload. Is there any way that I can recover these files? I tried the revert function in Filebot, but it only changed the Downloads.mkv file back to the name at the top of the list and now says "Some files are missing" if I try again, which makes sense since it moved the one file that there was back to the original folder.

I also tried running Recuva, but since the files were renamed to the same name it only found the one file that could be recovered.

Any help would be greatly appreciated!
User avatar
rednoah
The Source
Posts: 23953
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Renamed all my files to the same file (700 files lost)

Post by rednoah »

Since you used --action move --conflict override you won't be able to recover your files easily. Data recovery should be an option, but I can't recommend any specific tool. Some might work, some might not.

:idea: It is HIGHLY recommended that you use --action duplicate (used in all examples) or --action test or --action move --conflict skip (skip is default if not specified otherwise).

Please upload your amc.log to http://pastebin.com/ so I can have a look at what happened here.
:idea: Please read the FAQ and How to Request Help.
christoffdt
Posts: 4
Joined: 29 Sep 2016, 18:46

Re: Renamed all my files to the same file (700 files lost)

Post by christoffdt »

Okay, so I didn't say this before, but I deleted the amc.log file just before running the script, since the script is set to run every 3 days, but it has not been renaming files for the past month or so and in the past that was the solution and everything got renamed and moved into the correct folders.

And it seems that no amc file was created when it ran this time. I took a screenshot of the history and shared it here if that helps: https://snag.gy/sJgkha.jpg

But I kind of thought that if a recovery tool couldn't do it then there was no chance of recovering the files and the more time that passes the worse the odds become.
User avatar
rednoah
The Source
Posts: 23953
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Renamed all my files to the same file (700 files lost)

Post by rednoah »

1.
The amc log output would be best, but if the history.xml (click Export button) is all you have then I can use that to recreate the file structure and run some tests myself.

:idea: Why would you delete the amc log after overriding all your files? If you delete the log before running the script, then it'll just create a new one.


2.
The raw bytes are probably still on your disk unmodified. Physically overriding hundreds of GB with 0s would take hours. Some sectors may have been physically overridden by the OS with new data by now though.

Data recovery is very complex. Some tools may work significantly better than others depending on what kind of stuff you want to recover.

I'd try software that explicitely supports checking for avi/mkv/mp4 file headers:
http://www.cgsecurity.org/wiki/File_For ... y_PhotoRec


PS: I'm fairly sure you're using an outdated version of FileBot
:idea: Please read the FAQ and How to Request Help.
christoffdt
Posts: 4
Joined: 29 Sep 2016, 18:46

Re: Renamed all my files to the same file (700 files lost)

Post by christoffdt »

I deleted it before running the script because that worked in the past when my files weren't being renamed by the script. I searched my whole PC for one that was created after running the script but I couldn't find it.

It is also very possible I am using an outdated version, since I have my downloads set up automatically and then like magic Filebot sweeps in and renames and organises my files every three days, so I almost never run the platform and have had no need to update. I don't know where to see the current version.

And my xml is too large for pastebin, so you can access it here: https://drive.google.com/file/d/0B0NawR ... sp=sharing

Thank you very much for the help!
User avatar
rednoah
The Source
Posts: 23953
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Renamed all my files to the same file (700 files lost)

Post by rednoah »

The amc.log is stored in your app data folder. If you don't know that, then maybe you didn't delete it yet. ;)

FileBot will print the log location in the first line of the output:

Code: Select all

filebot -script fn:sysinfo --log-file amc.log

EDIT:

Looking at the history, I have no idea how that could possibly happen given the command you posted. None of your formats could possibly evaluate to C:\Users\<USER>\Downloads.mkv so without logs I can only assume that you used a different command when deleting/overriding all your files.
:idea: Please read the FAQ and How to Request Help.
christoffdt
Posts: 4
Joined: 29 Sep 2016, 18:46

Re: Renamed all my files to the same file (700 files lost)

Post by christoffdt »

Damn, I see.

The log file shows:
Run script [fn:amc] at [Thu Sep 29 18:41:30 CAT 2016]
Parameter: music = y
Parameter: subtitles = en
Parameter: artwork = y
Parameter: seriesFormat = C:/Users/username/Downloads
Argument: C:\Users\username\Downloads\new series

It seems I did not call the complete argument, since I pasted it in the Run dialog that comes up when you press Win+R and that only takes a few characters. So sorry for wasting your time. I guess the only thing left to do is try and recover the files.
Post Reply