Created
July 15, 2019 22:14
-
-
Save amedranogil/f2ea130ff9b34884128b31616de19330 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#install everything needed | |
sudo apt install testdisk fdupes id3ren id3convert libid3-tools exiftool convmv | |
sudo dd if=/dev/disk of=/somefile.dd bs=512 conv=noerror,sync | |
#use Photorec to recover files from the disk | |
sudo photorec /dev/disk #or /somefile.dd | |
#On destination folder... | |
#delete duplicate files (only exact duplicates are removed) | |
fdupes -R -dN ./ | |
#Rename images for better organization later on. | |
exiftool '-FileName<DateTimeOriginal' -d "%Y-%m-%d %H.%M.%S%%-c.%%e" */ | |
#Convert id3 tags of MP3s | |
id3convert -1 */*.mp3 | |
#rename MP3 based on id3 tags | |
id3ren -template='%a - %t - [%n]%s.mp3' -notagprompt */*.mp3 | |
#fix filename coding | |
convmv -f CP1252 -t Utf8 -r --notest ./ | |
#further organization can be achieved by moving files by filetype | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment