Ég bjó til smá forrit til þess að gera þetta í python. Til að keyra það þarftu bara að downloada python af <a href="
http://www.python.org/ftp/python/2.3.3/Python-2.3.3.exe“>www.python.org</a> og installa því (bara keyra install skránna). Ef þú vilt alls ekki gera það þá bjó ég til .exe útgáfu af þessu <a href=”
http://dagur.sytes.net/mp3dupes.zip“>hérna</a>.
#!/usr/local/bin/python
#encoding: ISO-8859-1
# File: mp3dupes.py
# Author: Dagur Páll Ammendrup
”“”Finds files with the same name in subdirectories“”"
import os,sys
from os.path import join, getsize
def clean(directory):
mp3s = {}
for root, dirs, files in os.walk(directory):
for file in files:
if not mp3s.has_key(file):
mp3s[file] = root
else:
print ‘Found two files named “%s”:’ % file
print ‘1: %9d bytes\t%s’ % (getsize(join(root,file)),root)
print ‘2: %9d bytes\t%s’ % (getsize(join(mp3s[file],file)),mp3s[file])
action = raw_input('Choose the number of the file you want to delete'+ \
‘(press enter to do nothing, q to quit): ’)
if action == ‘1’:
os.unlink(join(root,file))
elif action == ‘2’:
os.unlink(join(mp3s[file],file))
elif action == ‘q’:
sys.exit()
print ‘-’*15
if __name__ == “__main__”:
if len(sys.argv) == 1:
print “Usage: python mp3dupes.py ..”
for folder in sys.argv[1:]:
clean(folder)