To save space, I packed personal files into .rar archive files with encrypted file names and a password – like this:
I wanted to keep the contents within them obscure by renaming those .rar files and removed the file extension (a BIG MISTAKE) before uploading them to Google Drive. I've since deleted the files on my PC to save space.
Here's what the .rar file with the file extension removed looks like:
I've uploaded a LOT of these .rar files (~50 GB worth). When I downloaded one and re-added the ".rar" to the end of the file, it said "The archive is either in unknown format or damaged" as shown here:
My own limited research told me the metadata/signature/Start Header & End Header of the file has been lost/corrupted and needs to be recovered before the .rar file's contents can be read. I modified the file in a hex editor (the first 6 letters) so that the WinRAR window would at least open, and got these error messages:
So after my dumb self tried countless methods of repairing the .rar file (inbuilt WinRAR repair feature/using 7zip DIDN'T WORK), it'd be a lifesaver if anyone had better experiences with any good .RAR/archive file recovery software that they'd recommend, or methods to repair this.
\r\n
versus\n
usage. Did you use the same computer to upload and download the file? Just do a small test make a new small rar file, remove the .rar upload file as you did before download the file as you did as well and have a look at the size in bytes. When downloaded and smaller use unix2dos when larger use dos2unix when this rick does not work look with a hex editor in the file and try to figure out the problem.\r\n
versus\n
There are a number of implementations of it also for Windows 7 in stackoverflow.com/questions/20368781/… there are also some other alternatives (like Notepad++) for the conversion.\r\n
versus\n
? I can also use Notepad++.\r\n
issue it is easy to use dos2unix / unix2dos by means of e.g,dos2unix <file>
NOTE this is an inplace operation!, but I think the WinRar Repair Kit is even a better option to try (I never looked at it; I never had problems with rar files so-far).