title: how to fix 100's of alias' on mac after migration?
body: <p>I really hope someone can help me out with this.  I recently moved from one mac to another and did a clean install.  I have several folders with hundreds of alias (how do you say the plural of alias?)...</p>
  
  <p>The original file path is "/Volumes/Media Drive/Ableton/Warped Tracks/", and the new path needs to be "/users/joel/Music/Ableton Projects/Warped Tracks"</p>
  
  <p>I see how to fix them one at a time, but that would take hours.  I tried this applescript, but had no luck:
  <a href="https://apple.stackexchange.com/questions/2656/how-do-i-fix-failed-aliases">https://apple.stackexchange.com/questions/2656/how-do-i-fix-failed-aliases</a></p>
  
  <p>Can anyone give me a better applescript or another solution?  As I mentioned, I tried this applescript:</p>
  
  <pre><code>tell application "Finder"
      set these_items to the selection
  end tell
  
  repeat with i from 1 to the count of these_items
      set this_item to (item i of these_items) as alias
      set this_info to info for this_item
  
      if class of this_item is alias then
          tell application "Finder"
              set original_file to original item of this_item
              set this_alias_file_name to displayed name of this_item
              set container_folder to container of this_item
  
              set the_path to the POSIX path of (original_file as alias)
              set new_path to my replaceText("/Volumes/Media Drive/Ableton/Warped Tracks/", "/users/joel/Music/Ableton Projects/Warped Tracks", the_path)
  
              move this_item to trash
              try
                  make new alias file at container_folder to (POSIX file new_path) with properties {name:this_alias_file_name}
              on error errMsg number errorNumber
                  if errorNumber is -10000 then -- new original file not found, try relinking to old
                      try
                          make new alias file at container_folder to (POSIX file the_path) with properties {name:this_alias_file_name}
                      on error errMsg number errorNumber
                          if errorNumber is -10000 then -- old original not found. link's dead Jim
                              display dialog "The original file for alias " &amp; this_alias_file_name &amp; " was not found."
                          else
                              display dialog "An unknown error occurred:  " &amp; errorNumber as text
                          end if
                      end try
                  else
                      display dialog "An unknown error occurred:  " &amp; errorNumber as text
                  end if
              end try
          end tell
      end if
  end repeat
  
  on replaceText(find, replace, subject)
      set prevTIDs to text item delimiters of AppleScript
      set text item delimiters of AppleScript to find
      set subject to text items of subject
  
      set text item delimiters of AppleScript to replace
      set subject to "" &amp; subject
      set text item delimiters of AppleScript to prevTIDs
  
      return subject
  end replaceText
  </code></pre>
  
  <p>Any help would be greatly appreciated.</p>
  
  <p>Edit:  I think the problem with the applescript for me is that I have folders further down the path that all are different, and THOSE each contain the individual alias files.  IE:
  "/users/joel/Music/Ableton Projects/Warped Tracks/Folder A/file.alias",/users/joel/Music/Ableton Projects/Warped Tracks/Folder B/file2.alias", etc, etc</p>