Making 57,000 Files More Manageable With Finder?

Discussion in 'macOS' started by duncyboy, Mar 10, 2009.

  1. duncyboy macrumors 6502a

    Joined:
    Feb 5, 2008
    #1
    Bit of an odd one this:

    Long story short I lost a ton of files (my whole picture and video collection- family pics, sport stuff, wallpapers, cars, funny stuff, amusing pictures of cats with odd captions, Top Gear clips etc!)

    Luckily I've managed to get them back using FileSalvage BUT:

    They're all mixed in together one giant folder! :eek:

    I don't mind going through them all and organising them- I'm just glad to get them back- but is there a quick way of dividing them up into manageable folders? Going through this vast folder in Finder (even just re-sizing the window) causes endless Spinning Wheels of Death while it catches up. Is there a way, perhaps using Automator) of creating lots of folder and allocating about 500 files per folder?

    Like I say, I don't mind re-organising them manually but I just want to make Finder 'keep up' so to speak?

    Thanks
     
  2. sidewinder macrumors 68020

    sidewinder

    Joined:
    Dec 10, 2008
    Location:
    Northern California
    #2
    Use the shell and move files using wild cards.

    For example:

    $ mv /example/pathA/[aA]*.jpg /example/pathB/

    That would move all the files that start with "a" or "A" and end with ".jpg" from the "pathA" directory to the "pathB" directory.

    S-
     
  3. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #3
    The first idea I had is to use Terminal, yes the scary command line.

    Code:
    mkdir ~/images_to_sort
    cd path/to/giant/folder
    mv -v *.jpg ~/images_to_sort/
    The first line creates a folder named images_to_sort and the folder will be created in your home directory. The ~ represents a shortcut way to reference your home directory. The second line changes what folder Terminal is currently in. I don't know where your folder is at so you'll need to change that. The third line moves all files that have a jpg extension on the file to that newly created folder. The -v means verbose so you'll be able to see its progress (very handy for long operations like this so you know it's doing something).

    You can do this for various file types until you get a small enough set. The folder creation can be done through Finder as well if you're more comfortable with that. I could probably write it into an AppleScript if I knew where everything was at and what file types there were, but this shouldn't be too hard to do as is either.
     
  4. duncyboy thread starter macrumors 6502a

    Joined:
    Feb 5, 2008
    #4
    Cheers for the replies- managed to get it done now. Took a lot of trial & error and a bit of patience but that makes life a lot easier :)

    Now to just reorganise the buggers... :(
     

Share This Page