Use FTP to Search for Text in Filename or Content

Search for String Using FTP

If you need to search an entire directory via FTP for a text string (or search by filesize, date, or path), I’ve got some good news and some bad news. The good news it, if you are searching for files containing the string in their name: you can do it easily with FileZilla. The bad news is, there isn’t really a way to search the CONTENT of all the files via FTP. You could, however, download every file using FTP and then search the content locally with a program like Notepad++.

Otherwise, if you want to search the content of files without downloading them first, you would need to use SSH or something similar. Here’s how that would work:

A simple SSH command to do a search for “searchstring” in the current folder and all subfolders would look like this:

grep -rli "searchstring" *

Tired of dealing with your slow WordPress website? Email me at and mention the code #FreeHosting10 for two free months of lightning-fast WordPress hosting. We will even migrate you for free!

But most importantly, I want to show you how to use FileZilla to search for files with a given string in their file names. It’s actually quite simple!

1. Connect to your FTP server using FileZilla.
2. Click Server -> Search remote files… (or just press F3)
3. Fill in the fields you want. Note that you HAVE to enter something in for “Search directory:”. To just use the directory you are in, enter “/”.
4. Press search!

That’s it! Try and take advantage of the different search criteria you can use. There are plenty of comparison operators in there to mess with. “Contains” is most likely the one you want, as “equals” will require an exact match to work.

About Brian Johnson

Brian Johnson is a website developer and designer living in Minneapolis, Minnesota with a passion for code and WordPress. He spends his days building WordPress websites for small businesses, developing new code with the online community, and living life.