public void renameFile(MP3 file){
        String newName = getPattern();
        for (Tag t:Tag.values()){
            if (t==Tag.ARTWORK) continue;
            newName = newName.replace(t.getPattern(), (String)file.getTag(t));
        }
        newName = newName+".mp3";
        String fullName = file.getFile().getParent()+System.getProperty("file.separator")+newName;
        file.getFile().renameTo(new File(fullName));
    }