Skip to main content

Methods of Mass File Selection (for deletion)

Comments

2 comments

  • cPanelMichael
    Hello Nick, Ideally, you'd use SSH for this type of action because it's easy to search for files using the "find" command and then have all of the files listed in the search results deleted with the "rm" command. You may want to check with your hosting provider to see if SSH access is available. If so, we document how to access the server via SSH at: SSH Access - Documentation - cPanel Documentation Without SSH access, you are likely limited to using File Manager or FTP to remove the files. Filezilla is one FTP client that offers the ability to remove specific types of files. Here's a third-party URL where this is discussed: How to recursivelly delete all files with certain name with FileZilla Thank you.
    0
  • gibbsyns3
    Brilliant Michael, thank you. I do have ssh available, i have enabled it generated keys etc, but getting to a simple command prompt I find kind of daunting. To avoid the possibility of being back on here tomorrow with a 'what do i do to fix a site i've ruined through ssh' post, i have used the familiar filezilla method. easy, fast, and my first image size search has found the expected 4,500 files, so i estimate a clean up of around 80,000 files in total. the downside is that it is not deleting them into the server trash, but i'll just need to take care. search 'clean up wordpress media files' and you'll find this issue is not unique to me. follow those threads and many people are having a tough time finding solutions. Hopefully some will come across this thread. I'd spent 6-8 hours looking for a solution and you've given me two. i really appreciate your help. thank you.
    0

Please sign in to leave a comment.