iTunes put a "1" at the end of many of my song and video titles. How can I fix this? I recently consolidated my iTunes Library and now many videos have a "1" at the end of the file name. And weirdly, in the media library, there are two files - one with the "1" and one without. Luckily only one video appears in iTunes. Is there some way to clean up my media folder AND the filenames in itunes?
I just use a quick and dirty AppleScript to do things like this:`

-- BP Jan 2014
-- Trims a set number of characters from the Start of track names in an iTunes playlist
-- Or trims a set number of characters from the End of track names in a playlist
-- Or adds a prefix to each track name in a playlist.
-- Or adds a suffix to each track name in a playlist.
-- Trims take precedence over adds
-- It's best to do just one operation at a time, and set all the other variables to "" or 0 as appropriate.
--------------------------------- User settable variables
set PlaylistName to "AAA" -- Just add the tracks you want to change to a single playlist. When dione, delete the playlist.
set trimInitialchars to 0 -- nonzero value takes precedence over any addstart value
set trimFinalchars to 0
set addstart to "" -- nonempty value wil overide addend
set addend to ""
--------------------------------- End of user settable variables
set trimstart to trimInitialchars + 1
tell application "iTunes"
    activate
    set tracklst to every track of playlist PlaylistName
    set trackcount to number of items in tracklst
    repeat with n from 1 to trackcount -- Do the whole playlist:
        set oldtitle to name of track named (name of item n of tracklst)
        if trimInitialchars is greater than 0 then -- Trim stuff from front of track names
            set name of (item n of tracklst) to (characters trimstart through length of oldtitle) as text
        else if trimFinalchars is greater than 0 then -- Trim stuff from front of track names
            set name of (item n of tracklst) to (characters 1 through ((length of oldtitle) - trimFinalchars) of oldtitle) as text
        else if addstart is not "" then -- Add something to front of track names
            set name of (item n of tracklst) to (addstart &amp; oldtitle)
        else if addend is not "" then -- Add something to end of track names
            set name of (item n of tracklst) to (oldtitle &amp; addend)
        end if
    end repeat
end tell`