New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Operating System General OS operation information and support

1) find all files with a 2 or 3 or 4.jpg 2) delete those files


Post Reply New Thread Subscribe

 
Thread Tools
Sam B

 
Member Since: Feb 25, 2010
Posts: 2
Sam B is on a distinguished road

Sam B is offline
Man, this is getting ridiculous. In Windows, this would be a simple search and destroy using DOS commands. In Mac, it's harder...

1) find all files in a specific directory with multiple folders in that directory that have a 2, 3, or 4.jpg in the name.
2) delete all those files

Apple support suggested spotlight for all files with a 2 in the name and said I could use *2.jpg but it didn't work. I'm trying "Unix/AIX"-like commands and nothing works. I've downloaded two freeware apps to do this and they don't work.

I don't care if I do this via Gui (but I have hundreds of these files so drag and drop is too tiring) or in the actual OS.

Thanks for your help.
QUOTE Thanks
Lifeisabeach

 
Lifeisabeach's Avatar
 
Member Since: Sep 30, 2007
Location: Wilmington, NC
Posts: 7,011
Lifeisabeach has a reputation beyond reputeLifeisabeach has a reputation beyond reputeLifeisabeach has a reputation beyond reputeLifeisabeach has a reputation beyond reputeLifeisabeach has a reputation beyond reputeLifeisabeach has a reputation beyond reputeLifeisabeach has a reputation beyond reputeLifeisabeach has a reputation beyond reputeLifeisabeach has a reputation beyond reputeLifeisabeach has a reputation beyond reputeLifeisabeach has a reputation beyond repute
Mac Specs: iMac i3 (mid-2010) + OS 10.9; TV 3; iPhone 5S; iPad 4

Lifeisabeach is offline
I'm no ace with terminal commands, but I'm quite confident this would be quite easily done. The terminal kicks the nuts off of the Windows DOS commands, that much I know. But besides that, it would be insanely simple to build an automator action to do this for you. Just run Automator, start a new workflow and add these actions (along with your custom criteria):

Ask for Finder Items
Get Folder Contents
Filter Finder Items
Move Finder Items to Trash

Works like a charm.


Please verify and include the exact model/year of your Mac and OS X version number (available from "About This Mac", then "More Info" on the Apple menu).
------
Links: Onyx | EasyFind | Apple Hardware Test | How to test your hard drive | The Safe Mac Adware Removal Guide | Uninstall MacKeeper
------
Lifeisabeach - Mac-Forums Member of the Month June 2009, Feb 2012, and March 2013.
QUOTE Thanks
MYmacROX

 
MYmacROX's Avatar
 
Member Since: Mar 17, 2009
Posts: 3,631
MYmacROX is a name known to allMYmacROX is a name known to allMYmacROX is a name known to allMYmacROX is a name known to allMYmacROX is a name known to allMYmacROX is a name known to allMYmacROX is a name known to all
Mac Specs: 2008 15" MBP ML, 2012 21.5" iMac ML

MYmacROX is offline
I don't understand why your Finder search for "2" didn't turn up any results. Do you have it searching for file name or Contents? Maybe you just need to click on the file name filter. I just did it and turned up lots of files with a "2" in the title. You can filter the search results by file type or name and other such criteria.
Maybe it has to do with the OS you're running. Is it older? This search definitely works in SL.

16GB iPhone 5, 64GB Wi-Fi only iPad 1st Gen.

Reminder: Please include your Mac's specs. This will make it much easier for the other members to assist you.
QUOTE Thanks

Post Reply New Thread Subscribe


« Help for USB Overdrive? | Restoring my Macbook Pro »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
where else might I find random useless files I need to delete? deathtolife04 OS X - Operating System 2 12-18-2008 10:29 PM
Artwork, iTunes and icons for audio files in Finder Theophil iOS and Apps 2 11-27-2008 10:55 AM
My .dmg file won't update the capacity when I delete files cide28 OS X - Operating System 3 05-05-2008 02:32 PM
10.2.8 - Find Files ? Pattay OS X - Operating System 3 03-01-2006 07:43 AM
how to find and delete temp files zarp3333 Other Hardware and Peripherals 6 11-13-2003 12:21 PM

All times are GMT -4. The time now is 10:58 AM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?