Viewing 10 posts - 1 through 10 (of 10 total)
  • Mac users – delete just jpegs in folders
  • Duane…
    Free Member

    Hi all,

    Running out of space on my mac, so trying to clear it out a bit. I have jpeg and raw copies of a lot of pictures, so want to delete all the jpegs. Is there an easy way to select just the jpegs in Finder – they are currently alternating jpeg and raw? Sorting by image size or type doesn’t do anything.

    Thanks,
    Duane.

    IA
    Full Member

    Do a search and delete them from there.

    Or in terminal:

    rm *.jpg

    would delete any files ending .jpg in that folder. They’ll be gone with no warning or recycle bin tho, so be careful!

    IA
    Full Member

    Oh and by search i mean type:

    “kind:jpeg”

    in the search box of finder, that’ll find any jpegs with whatever extension. Should be obvious how to choose current folder (rather than the whole mac!)

    Duane…
    Free Member

    Thanks. Searching a folder is good, but it also comes up with any jpegs in a folder within that folder – so risk deleting those by accident if I’m not careful.

    IA
    Full Member

    Oh, and “disk inventory X” is a good app to see where all your space has gone.

    chambord
    Free Member

    I’d have though sorting by size would make this easy?

    If that doesn’t work, then this may be a job for the terminal…

    Something like

    find /path-of-folder -name "*.jpg"

    will list all of the jpegs in a folder (And folders below that).

    If you are confident that all of these files can be removed then


    *DISCLAIMER – This bit will remove files!!! DO NOT DO THIS UNLESS YOU ARE SURE!

    find /path-of-folder -name "*.jpg" -delete

    Will delete them as well.

    Thanks. Searching a folder is good, but it also comes up with any jpegs in a folder within that folder – so risk deleting those by accident if I’m not careful.

    If you don’t want to search recursively then please ignore my advice above.

    You can do

    ls *.jpg

    to list all jpegs, and as IA says above,

    rm *.jpg

    to remove them

    IA
    Full Member

    Ok if you want just in a folder, the best way I know is the command line. Be careful though (or update your backups first!):

    In terminal, you change folder with “cd”, list files with “ls” and delete with “rm” and it’ll match patterns. So “rm *.jpg” removes any file ending with .jpg.

    E.g.:

    Macaroni:~ iain$ cd Pictures/
    Macaroni:Pictures iain$ ls
    Aperture Library.aplibrary LightroomMasters
    Desktop Photos Photo Booth
    DoubleTake Library Photo Booth Library
    Flowers-iPhone.jpg backgroundIdeas.jpg
    Flowers.jpg iChat Icons
    Google Photos Backup in-unsorted
    Lightroom
    Macaroni:Pictures iain$ ls
    Aperture Library.aplibrary LightroomMasters
    Desktop Photos Photo Booth
    DoubleTake Library Photo Booth Library
    Flowers-iPhone.jpg backgroundIdeas.jpg
    Flowers.jpg iChat Icons
    Google Photos Backup in-unsorted
    Lightroom
    Macaroni:Pictures iain$ ls *.jpg
    Flowers-iPhone.jpg Flowers.jpg backgroundIdeas.jpg
    Macaroni:Pictures iain$

    Duane…
    Free Member

    Am I doing something wrong if when I select the “Item Arrangment” box for a folder and choose sort by Name, it doesn’t sort by name – ie the list could still be:
    P10209
    G898
    P10298
    etc

    nickjb
    Free Member

    In Windows rather than delete them I resize them to a much smaller size. Makes it easy to browse what’s there and takes up negligible space. Should be possible on a Mac too.

    jamesfts
    Free Member

    Using Terminal seems overkill, why not just open the folder, change view to list and sort order by Kind. Select the first and (shift+) select the last and delete?

Viewing 10 posts - 1 through 10 (of 10 total)

The topic ‘Mac users – delete just jpegs in folders’ is closed to new replies.