Mac users - delete ...
 

  You don't need to be an 'investor' to invest in Singletrack: 6 days left: 95% of target - Find out more

[Closed] Mac users - delete just jpegs in folders

9 Posts
5 Users
0 Reactions
82 Views
Posts: 2418
Free Member
Topic starter
 

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.


 
Posted : 06/09/2015 10:05 am
 IA
Posts: 563
Free 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!


 
Posted : 06/09/2015 10:09 am
 IA
Posts: 563
Free 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!)


 
Posted : 06/09/2015 10:10 am
Posts: 2418
Free Member
Topic starter
 

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.


 
Posted : 06/09/2015 10:14 am
 IA
Posts: 563
Free Member
 

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


 
Posted : 06/09/2015 10:14 am
Posts: 1454
Full 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

[b]
*DISCLAIMER - This bit will remove files!!! DO NOT DO THIS UNLESS YOU ARE SURE!
[/b]

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


 
Posted : 06/09/2015 10:14 am
 IA
Posts: 563
Free 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$


 
Posted : 06/09/2015 10:17 am
Posts: 2418
Free Member
Topic starter
 

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


 
Posted : 06/09/2015 10:27 am
Posts: 16346
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.


 
Posted : 06/09/2015 11:35 am
Posts: 623
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?


 
Posted : 06/09/2015 12:29 pm

6 DAYS LEFT
We are currently at 95% of our target!