Batch "Put Back" files from Trash to original location

Discussion in 'OS X Mountain Lion (10.8)' started by jozeppy26, Apr 22, 2013.

  1. jozeppy26 macrumors 6502


    Jul 8, 2008
    St. Louis
    Is there anyway to use the native "put back" feature to restore 11,000 items that are currently in the Trash?

    Files originated from many different folders throughout the OS. The "Put Back" option in the contextual menu is greyed out unless only 1 file is selected at a time. Has anyone ever tried (and succeeded) at writing something in Automator or an Applescript to batch "put back" each file individually? Or do I really have to use "command + delete" & close the opening folder 11,000 times? My friend is panicking.

    I've tried google searching for a repair to this issue, but I only get a bunch of posts from 2010 with people claiming that "Mac's don't put back anything from the trash. Oh wait, I guess I was wrong, it does" but then no one continues to research the issue.
  2. w0lf macrumors 65816


    Feb 16, 2013
    Maybe try this?

  3. jozeppy26 thread starter macrumors 6502


    Jul 8, 2008
    St. Louis
    that'll do it. I ran into the same issues with the original code, thank goodness there's someone smart enough to fix it. Many thanks to you and OP.
  4. tomtom2 macrumors newbie

    Jul 4, 2013
    Put Back All Files from Trash

    I accidentally deleted 1,057 files. I really need those back in their original location.

    I tried to run the script and it is doing something but it doesn't move the files.

    Any idea?

    Thank you in advance.
  5. canuckuk1 macrumors newbie

    Oct 22, 2013
    files moved to trash with mackeeper!!!

    Does ANYONE know how i can put back all the files that have been moved into my trash by mackeeper where they belong...i tried selecting them one bye one and using the put back option but its greyed out!! i have all the files in tact but i dont know where to put them or how to do it...if anyone has any ideas i would greatly appreciate it!!! i tried using the apple script above but it wont work:( im using an imac 10.8.5 and i live in the UK if that helps anyone with an answer for me...HELLLLPPPPPPPPPP PLEASE!!! im loosing my mind my apps and programmes are not working properly coz the files are out of place:(
  6. nxPLQh2SWAjHLnQ macrumors newbie

    Jan 15, 2014
    "Put Back" files from Trash

    For years all that was required to move files from Trash back to their original locations was to select "Put Back" using "Action" gear icon on command bar.What happened to this option and how can it be retrieved? Requiring an "application" to perform a single function formerly handled by use of the "Action" [gear icon] command is absurd: adds unnecessary complexity, wastes available system space, and ultimately detracts from a certain economic measurement known as Gross Domestic Product[ivity].*
  7. rikitrader macrumors newbie

    Dec 26, 2015
    Hello Mr. Wolf,

    You wrote these script which is awesome. Is there a way to make a command that if the script finds a file that it has not put back option, it will continue to the next file?

    Let me know if it's possible, the reason is because some of the files were corrupted since when I realized that I was dealing the files I tried to stop them.

    Waiting for your Good News.

    You original script was :

Share This Page