Deleting 30,000 folders of thumbnails!?

Hey all,
I have a hairy problem: after three years of mismanagement and switching between applications (Lightroom and Aperture), I have a horrendously disorganized photo library including 40,000 photographs, ~30,000 of which are thumbnails that I need to delete. Now, all of the thumbnails are located in identically named "Thumbnails" files deep (8 folders or so down) within my photo directory. It is a total mess.
I am trying to just do a spotlight search for "Thumbnails" within my "Photo" folder, and this brings up about 30,000 entries. These are all located on an external drive, so when I choose select all, Finder brings up the beachball and works for ten minutes before I can do ANYTHING else. Then, if I want to right click and check "send to trash," it takes 20 minutes to register the right click, and freezes up my computer entirely to try to send all of these to the trash.
I have been trying to just grab 1000 or 2000 of each and delete a few thousand a day, but my computer is still crashing often as a result. Is there a better way?
Thank you!
Alec

Working with tens of thousands of files can be a problem as you are finding out. Are you at all Unix savy? This is fairly advanced stuff if you never saw the terminal window before. If you are not comfortable doing this find a 14 year old unix guru to help you.
I use the Unix "find" command for handling massive amounts of files like this. Type... man find ...in the terminal window to see the man page for find. find recurses through the subdirectories looking for the files you specify and pipes the output to other commands. In this example I find a directory named Thumbnails and do something to it.
(I assume what you mean is there are directories named Thumbnails containing the small images scattered all over your Photo drive. )
As a test get into the terminal window and type...
cd Photo
(or whatever the path is to get into your Photo directory. It might be under /Volumes/Photo or something similar if its an external drive)
cut and paste this in the terminal window...
find . -name Thumbnails -type d -exec ls -l {} \; | more
This command is non destructive and will find all the directories under your current location called Thumbnails (case is important) and run the ls (list) command on them. It will list all files inside all the Thumbnails directories, a page at a time. Use the spacebar to scroll the pages. Ctl-C to quit. Get rid of the... | more ...to just have it scroll.
I ALWAYS do this listing before doing anything destructive with find just to see what is being found. The files listed out will be the ones that will be erased with the next command.
The dot after find means start in the current directory. Make sure you are in the correct directory!
OK it would be a really good idea to make sure your backup of Photo is up to date before doing this.
This command will find and erase ALL directories named Thumbnails under your current directory along with all the files and subdirectories inside Thumbnails. The rm -rf means recurse through each Thumbnails directory it finds and erase everything including the directory itself. the -type d means only find directories named Thumbnails not files named Thumbnails.
This one is very destructive!
MAKE SURE you are in the Photo directory and type this...
find . -name Thumbnails -type d -exec rm -rf {} \;
After a few moments all directories under Photo named Thumbnails will be gone

Similar Messages

  • Accidentally deleted all my folders

    I had my blackberry as well as my memory stick connected to my pc . I wanted to clear out my memory stick and unfortunately in a moment of complete distraction I deleted all my folders off my BB! I could kick myself!! So now when I connect my BB to my pc all the folders appear as shortcuts and are only 1KB in size. I can take pictures but it does not save them, I cant take videos or voicenotes at all. I cant copy and paste anything into them. If the folders now appear as shortcuts surely the original folder can be restored? Is this possible?
    My contacts, email and IM settings remain the same - Its just the "Media" I am having a problem with! When I called our service provider I was told that I needed a new memory card and that will restore all the settings. That does not make sense to me.
    I tried to update the software on my phone but it did not fix the problem as I had hoped.
    Any suggestions how to proceed?
    Thanks
    Tanea

    Hi Tanea,
    If you deleted all of your folders from your BlackBerry media card, all data inside those folders would have been removed as well.  If your folders were empty and you just want the folder structure back, you can format your media card under Options>Memory, press the menu key then Format. 
    Let me know if this works!
    -CptS
    Come follow your BlackBerry Technical Team on twitter! @BlackBerryHelp
    Be sure to click Kudos! for those who have helped you.Click Solution? for posts that have solved your issue(s)!

  • BOE XI 3.1: How to batch delete 10,000+ history files?

    Hi,
    Does anyone know how to batch delete 10,000+ history files?
    Thanks,
    Vicky

    If you contact support, they will provide you with a script that fixes this.
    Also, Service Market Place has a note on it about this :
    SAP Business Objects Enterprise Daylight Savings Brief
    Applies to: All Business Objects Enterprise XI r2, and XI 3.x Environments
    Brief: Due to Daylight Savings Time changes that went into effect in North America on March 13, 2011 there is an increased potential of scheduling issues to appear in Business Objects Enterprise XI r2 and XI 3.x environments. If you encounter any potential Daylight Savings Time issues please refer to the SAP Knowledge bases below for potential resolutions and if required please raise a Message for Processing to SAP Active Global Support.
    Business Objects Enterprise XI r2:
    1448881 - Multiple instances spawned after daylight savings time change
    Business Objects Enterprise XI 3.x:
    1568239 - After DST change Schedules fail in Business Objects Enterprise XI 3.1 with: Object could not be scheduled within the specified time interval

  • Deleting 20 000 records

    Hi
    I have to get deleted 20 000 of unwanted records in one of my oracle database. As i monitored , when i going to delete a single record it takes around 2 mins time and also it's gonna be a impact for performance as well since its increasing CPU usage.
    Can somebody help me to delete those records by finding a most suitable way ?
    Many Thanks
    Luke

    Presumably, you're storing this multimedia data in a BLOB column (or columns), correct?
    No matter how much data you store in a row, it shouldn't take 2 minutes to delete a row.
    - How are you identifying the row to delete? Is the WHERE clause in your DELETE statement referencing a key? Or is the DELETE doing a full table scan to find the one row that needs to be deleted?
    - Are there any triggers on your table?
    - Is this a parent table in a foreign key relationship? Is the parent key unindexed in any of the child tables? If you delete a row from a parent table, Oracle needs to make sure that there is no row in any child table that references the deleted key. If that requires a table scan of a child table, rather than a simple index lookup, that could explain the problem.
    As others have requested, a query plan and a trace of the session would help us narrow down whether any of the above options are actually the culprit or if the problem is more obscure than that.
    Justin

  • LR 2.6 deleted 23,000 pictures - HELP!!!

    Lightroom deletes 23,000 pictures in 2 seconds.  Can you give me any pointers on how to get them back?
    I've never had a problem before and this morning like a shot of lightning, while switching back and forth between an archive catalog and this active catalog, now my picture are all coming up with those little ? in the corners telling me it cannot find the images. I know I exported one image from the catalog to Flickr using Friedl's  exporter, pressed the cancel button halfway through the export, switched  to a different catalog and when I came back to this catalog, everything was gone.
    The LR catalog is fine, but poking around on my HD revealed that the folder structure for the images is completely gone.  Nothing shows up in the recycle bin, but Windows still shows these 300 GB of files as being used so I'm sure they are still out there somewhere.  I tried an unerase utility to see if a simple restore was possible, but I don't see the top level folder anywhere.  I have been very careful to not mess around too much as I don't want to ruin my chance of recovery.  Windows has not done a check disk on this drive yet,
    For reference, Win XP 64 bit with LR 2.6 64 bit, and a very active catalog. Files are backed up every 2 weeks, but it will be a very nasty job to restore everything.  As luck would have it, a backup was due to run, so my restore will be 2 weeks out of date on this very active catalog.  Only the last 6 months of pictures is on this computer.
    My 500 gig drive is partitioned as follows.
    Drive c:Windows partition 50 gig
    Drive d: All data including pictures here 450 gig  (300 gigs of pictures are nowhere to be found but the space is still showing as used)
    My Pictures
       Pictures 2010
           Jan
              Jan 2 2010 Concert Shoot
              Jan 3 2010 Smith Wedding
           Feb
           Mar
           etc.....

    I just read the thread now, but even just reading the original post, I wasn't worried for you, because LR can't delete 23,000 files in a few seconds.  It would take a much longer time to do that.  There was obviously just a catalog shift within Windows and outside of LR, so that all your files were still there in a new folder location. Remember that LR is at heart, in terms of photo management, a database program consisting of pointers that it records, stores and uses to locate your files.  (iTunes works in a similar way with .mp3 and other music and video files.)  If you use LR to move a file, LR should reset its pointer to the new location.  If you use Windows to move the file, LR's pointer is now incorrect and it can't find the image any longer.  The solution, as you found, is to restore the file to the location where Lightroom knew it last was.
    Nonetheless, you are wise to treat this incident as you did, as a warning shot across the bow, and install real-time backup since your photo files are important to you.  Keep checking to make sure the backups are working as you expect. The only thing worse than not having backups is having a backup system that lets you down when you need it most.

  • Low disk space - Deleted 50,000 messages - no change !

    Netware 6.5 Server with GW 7
    Over the last 2 weeks I have deleted 50,000+ messages from various accounts
    Not freed up any disk space !
    Do I have to run any routines to clear up this space ??
    Getting critically low now ~ 3Gb

    even more deleted now but,...
    Delete & Empty ?
    I'll give a go with Expire - I'm sure i tried that at the time but...
    "Bob-O-Rama" <[email protected]> wrote in message
    news:[email protected]..
    >
    > bill;2231979 Wrote:
    >> Netware 6.5 Server with GW 7
    >>
    >> Over the last 2 weeks I have deleted 50,000+ messages from various
    >> accounts
    >>
    >
    > Deleting is one thing, that puts stuff in Trash. "Delete & Empty" or
    > "Empty Trash" marks the items for purge, whic is to day "really" deletes
    > them. Without the purge, the item will not be removed. So which of
    > these variations did you actually do?
    >
    > -- Bob
    >
    >
    > --
    > Bob Mahar -- Novell Knowledge Partner
    > Do you do what you do at a .EDU? http://novell.com/ttp
    > "Programming is like teaching a jellyfish to build a house."
    > More Bob: 'Twitter' (http://twitter.com/BobMahar) 'Blog'
    > (http://blog.trafficshaper.com) 'Vimeo' (http://vimeo.com/boborama) <--
    > Click And Be Amazed!
    > ------------------------------------------------------------------------
    > Bob-O-Rama's Profile: http://forums.novell.com/member.php?userid=5269
    > View this thread: http://forums.novell.com/showthread.php?t=461883
    >

  • Can't delete 9,000 "deleted photos" from iBigBrother.

    I have had an issue deleting photos from my iPhone for at least 6 months. Now, with the new "recently deleted photos" I can't even delete 9,000 photos that I manually deleted one...............by................. one. That process alone took me WEEKS. I've commented on these boards about it previously.
    Now, when I enter the "recently deleted photos" and try to delete the entire album, nothing happens. Seriously..? I'm at my wits end with this device. My storage is full because of these photos so I can't take a photo of my daughter playing.. or swimming .. or anything. It tells me my phone is full. Talk about "smart phone."
    I restarted my phone. Restarted my computer. Prayed and danced in the rain.. and nothing. I just can't figure out why Apple thinks they know how to manage my photo roll better than me. I should be able to wipe all photos from my device with a few clicks, but no..... I was forced to manually delete 9,000 photos and now I am being asked to manually delete each photo.. all over again.
    This will be the last piece of Apple technology I ever buy. I am fed up. I am fed up about my inability to delete any - and all of - my photos at will. I am fed up with losing paid music when I change emails/accounts. I am fed up with the way the device keeps the stupid "radio" button up top despite my desire to remove it. I am fed up with iTunes and how we can no longer listen to songs continuously according to genre. I am fed up with the addition of music and applications without my permission. I do not want these stupid apps (tips, radio, apple watch, and health). Here's a tip for Apple's executives - from a customer who has invested tens of thousands of dollars in Apple technology: I own this device - not you. Please stop working on adding apps and features to my iPhone that I do not want or need and start solving existing problems. You have taken something great and ruined it.

    danamarlane wrote:
    I am fed up with losing paid music when I change emails/accounts.
    There's no reason to lose music when you change email addresses, either. Just update your Apple ID with your new email address. I've done it once. Took me five minutes and I didn't lose a thing.

  • My Macbook Air can delete files and folders and take them to Trash Can but cannot delete from Trash Can . Cannot empty trash securely.

    My Macbook Air can delete files and folders and take them to Trash Can but cannot delete from Trash Can . Cannot empty trash securely.

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
    View ▹ Show Log List
    from the menu bar.
    Click the Clear Display icon in the toolbar. Then try the action that you're having trouble with again. Select any messages that appear in the Console window. Copy them to the Clipboard by pressing the key combination command-C. Paste into a reply to this message by pressing command-V.
    When posting a log extract, be selective. In most cases, a few dozen lines are more than enough.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some private information, such as your name, may appear in the log. Anonymize before posting.

  • 10.6 - Can't Delete Share Point Folders

    Hello Everyone. I am using Mac OS X Server, version 1.6 "hosted" by GoDaddy, so I don't have access to the Finder window to access files directly. All of my access has to be through Server Admin, Workgroup Manager, or an FTP client (in my case, Filezilla).
    I am trying to find a way to delete share point folders, but have not been able to find any method other than using the Finder, which I do not have access to.
    Any help, guidance, help would be greatly appreciated please.
    Thanks,
    Paul

    Hi
    +"I am using Mac OS X Server, version 1.6 "hosted" by GoDaddy"+
    What does this mean exactly? Is the Server at GoDaddy's offices and behind their firewall or do you mean the domain is with GoDaddy? Every OSX Server installation enables ssh and by default. If the Server is at a location and a network environment you're familiar with and assuming NAT and you're trying to do this remotely, simply open the relevant ports in the Firewall to forward external access to the Server's private IP address.
    With Remote Management you have access to the Finder.
    If the Server is using a Public IP address (unless you're aware of the risks I would not recommend this) then either establish an ssh or vnc connection. If you're going to attempt ssh you should be familiar with the command line. If this is not to your taste use vnc instead.
    Tony

  • I am deleting 44,000 files; why is it so very slow to do this chore?

    I am deleting 44,000 files; why is it so very slow to do this chore?

    Could something from Bitdefender be activated somehow and slowing my computer down?
    Yes. Back up all data, then uninstall "Bitdefender" completely according to the developer's instructions -- NOT by dragging an application to the Trash or hunting for files by name.

  • Why cant i delete icloud contact folders from outlook

    why cant i delete icloud contact folders from outlook

    How are you trying to delete them, and what error messages are you seeing when you do?

  • I deleted some backup folders and now i can't turn on backup

    i thought i was cleaning up and deleted some backup folders.  now when i click on time machine i don't have the option to turn on/off backups.  if i attempt to access it via Finder it will not allow me or another networked computer connect.

    Please explain what you mean by "backup folders".
    Please update your "Profile" (under "My Stuff") to include the version of OS X you're using and the details of your hardware.  The advice you need can sometimes depend on those details.

  • Can I delete the files/folders in 'Apple Computer\MobileSync\Backup'?

    Hi!
    I have just tried to backup and update my iphone to iOS 5.1. The backup seems to have worked but when it came to restoring the iphone, I think the hard disk ran out of space and so it failed. I saw this and so I freed up around 3Gb of disk space and I tried it again. It again failed. Again I noticed that there was no space left on the hard disk. I assumed that to continue the restore it probably won't need that much more space (as it had already done most of the work) so I freed up a few more Gb.
    Again it failed. When it fails, itunes leaves the partially restored elements on my hard disk meaning that my 'Apple Computer' folder is now 28Gb!! I cannot afford to delete anything else from the hard disk. I am using a PC by the way. I have noticed that in the folder 'Apple Computer\MobileSync\Backup' has 5 folders in it which is the same amount that I tried to restore the iphone (before the last restore attempt there were 4 folders). These folders amount to 20Gb. From this I am assuming that the actual backup that I made is infact in 'Apple Computer\iTunes\Mobile Backups'.
    Can I delete the folders in 'MobileSync\Backup'? This would free up 20Gb of disk space giving me enough to properly restore (in theory!).
    Thanks for your time!!
    Nick

    your advice worked for me and saved me what ever evil lurked behind my thought to just delete the backup and get back my very lmited space on my 250GB Mackbook Pro using daisydisk pro https://itunes.apple.com/us/app/daisydisk/id411643860?mt=12
    Why DaisyDisk?
    DaisyDisk remains the tool of choice for film makers (including companies like Pixar), digital artists, IT professionals and hundreds of thousands of Mac users worldwide when it comes to disk space management. Constantly improving since its initial introduction, the app easily blows away competition in terms of speed, efficiency and user experience.
    @wjostenMar 27, 2012 4:03 AM Re: Can I delete the files/folders in 'Apple Computer\MobileSync\Backup'?
    Re: Can I delete the files/folders in 'Apple Computer\MobileSync\Backup'?in response to nickcrowney
    Delete iOS backups this way: iTunes>Preferences>Devices...select the backup/backups...hit delete. Do not mess with your backup folder.

  • Can not delete or transfere folders or photos, why?

    Can not delete or transfere folders or photos created in Photo app on iPad 3 from iPad 3 or transfere those same thru iTunes.

    Try Here  >  http://support.apple.com/kb/HT4236

  • Delete Aged Files & Folders from Subfolders

    Hi,
    I have the following script to delete files and folders older than 7 days. It work but I need to be able to go through subfolders as well:
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objFolder = objFSO.GetFolder("C:\FTPRoot_External")
    For Each file in objFolder.Files
    If DateDiff("d", file.DateLastModified, Now) > 7 Then
    objFSO.DeleteFile(file)
    End If
    Next
    For Each folder in objFolder.SubFolders
    If DateDiff("d", file.DateLastModified, Now) > 7 Then
    objFSO.DeleteFolder(folder)
    End If
    Next
    Any suggestions?
    Thanks.

    Here is an example I coded sometime ago with a recursive sub. You can modify this for your needs:
    Option
    Explicit
    Dim strFolder, objFSO, objFOlder
    ' Specify main folder.
    strFolder = "c:\scripts"
    ' Retrieve folder object.
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objFolder = objFSO.GetFolder(strFolder)
    ' Enumerate files.
    Call GetFiles(objFolder)
    Sub GetFiles(ByVal objParent)
        ' Enumerate files in folder.
        Dim objFile, objChild
        For Each objFile
    In objParent.Files
            Wscript.Echo objFile.Path &
    "," & objFile.DateLastModified
        Next
        ' Recurse through nested folders.
        For Each objChild
    In objParent.SubFolders
            Call GetFiles(objChild)
        Next
    End Sub
    Richard Mueller - MVP Directory Services

Maybe you are looking for

  • Help on purchasing a dvd camcorder to work with imovie

    hello out there...was wondering which camcorder that has a dvd burner works best with imovie and osx...i want a sony, but i thought the small dvd's did not work on osx. presently, i have a digital8 and use a firewire connection to ingest video for ed

  • New HP Envy 15 wont start and HP Support wont help under warranty

    Seems that once you purchase an HP product these days and register it online and show the warranty data that HP will not do any warranty work for you unless you produce the sales receipt.  I work internationally and travel the world.  Recently purcha

  • Unable to update the VAT_CODE column through supplier sites API

    Hi, I'm unable to update the vat code column of the ap_supplier_sites_all table using the ap_vendor_pub_pkg.update_vendor_site API.Oracle application instance 12.1.3 and OS linux.Please find the code below.I'm able to update other feilds,but not the

  • Problem with itunes... Please help!

    Hi all, I have 100 songs in my itunes that successfully transferred to my ipod. Now when I go into itunes and double click on a song I want to hear in the library, it plays the song for about 3 seconds, then it skipps and scratches as if the cd is sk

  • Keeping music from another persons itunes library

    I got a 30G video ipod for christmas, and I used my sisters itunes to put some of her music on it while I was home from school. Now i'm back at school on my computer and itunes is telling me if i want to link my ipod to MY itunes library, it will rep