/removeDuplicateFilesPythonScript

This was just written with the purpose of removing Duplicate songs in multiple directories. One can use it for a variety of files by the way. Have fun. Contact 'darshanbari123@gmail.com' for any doubts or error reports. Thank you.

Primary LanguagePython

removeDuplicateFilesPythonScript

This was just written with the purpose of removing Duplicate songs in multiple directories. One can use it for a variety of files by the way. Note that
1)The python script "py_repeat_songs_remover_byName.py" considers two files with the same name as the same files.
2)The python script "py_repeat_songs_remover_byFile.py" considers two files with the same file content as the same files.
The use is as follows: python3 py_repeat_songs_remover_byName.py /path/to/directory
Example: python3 py_repeat_songs_remover_byName.py /home/silver_buzz/directory/

silver_buzz@PC:~$ tree directory/
directory/
├── anotherDirectory
│   ├── a.txt
│   ├── b.txt
│   └── c.txt
├── a.txt
└── whatAnotherDirectory
    ├── b.txt
    └── d.txt

2 directories, 6 files
silver_buzz@PC:~$ python3 py_repeat_songs_remover_byName.py /home/silver_buzz/directory/
Deleting /home/silver_buzz/directory/anotherDirectory/a.txt
Deleting /home/silver_buzz/directory/whatAnotherDirectory/b.txt
silver_buzz@PC:~$ tree directory/
directory/
├── anotherDirectory
│   ├── b.txt
│   └── c.txt
├── a.txt
└── whatAnotherDirectory
    └── d.txt

2 directories, 4 files
silver_buzz@PC:~$ 

Hope you understood.