FTP search and replace

Hi friends, any one know any ftp search and replace tool, i want to search string or using regex and replace the content with it on a large static site. any famous tool that do this?

Not possible. FTP has to download each file in order to process it.

Your best bet would be to download the entire site and find/replace locally using a tool like notepad++, dreamweaver or phpstorm.

There are many better ways to download a large site than file by file using ftp. My favorite is to upload a php script with something like this in it:

passthru('tar -cf full_site_backup.tar .');
passthru('bzip2 full_site_backup.tar');

then just download the resulting full_site_backup.tar.bz2 file. Unzip the backup on your computer, do the mass find/replace, package all the files up again (zip or tar or whatever), upload the package to your website then run a php script like:

passthru('tar -zxfv full_site_backup.tar.bz2');

and it will unpack the entire modified site over the top of your old files.

of course with anything like this, use caution and backup first.

Have you tried doing it with Coda? Coda simulates editing the files live on the web server by downloading them in the background, I believe (if you choose to work that way, anyway). I’ve never tried to do mass find/replace actually on the server, but wouldn’t that work? Anyone else tried that?

You can do it with an IDE like Eclipse, but it will be pretty slow over the network. In Eclipse, go to the Search menu, then Remote. You can do a regex search against file names or within the files themselves.

  1. SFTP instead of FTP
  2. Any SFTP client with custom command feature (like WinSCP)
  3. man rename (you can specify patterns, use regex, etc.)
  4. ???
  5. PROFIT
P4tient said
  1. SFTP instead of FTP
  2. Any SFTP client with custom command feature (like WinSCP)
  3. man rename (you can specify patterns, use regex, etc.)
  4. ???
  5. PROFIT

Do you use any drugs?

P4tient said
  1. SFTP instead of FTP
  2. Any SFTP client with custom command feature (like WinSCP)
  3. man rename (you can specify patterns, use regex, etc.)
  4. ???
  5. PROFIT

man i use Staff FTP and go to custom command know i have to do, put any unique command or just put my regex on it. or let me know which type of regex required plz can you guide me.

webdesignerart said

man i use Staff FTP and go to custom command know i have to do, put any unique command or just put my regex on it. or let me know which type of regex required plz can you guide me.

Trying to rephrase: I supposed that large site hosted on Linux. By saying man rename I meant Linux command man for another command rename, so by typing man rename
or googling for rename linux command you can find documentation for this tool and examples of using patterns and regex. Unfortunately, not every hosting supports SFTP or SSH, where you can run that commands.

I didn’t provide any examples because I don’t know, what exactly do you want to rename.

P4tient said
webdesignerart said

man i use Staff FTP and go to custom command know i have to do, put any unique command or just put my regex on it. or let me know which type of regex required plz can you guide me.

Trying to rephrase: I supposed that large site hosted on Linux. By saying man rename I meant Linux command man for another command rename, so by typing man rename
or googling for rename linux command you can find documentation for this tool and examples of using patterns and regex. Unfortunately, not every hosting supports SFTP or SSH, where you can run that commands.

I didn’t provide any examples because I don’t know, what exactly do you want to rename.

i don’t want to rename, i want replace some string from the site but in whole site just find that string and replace with another string. That’s All.

webdesignerart said

i don’t want to rename, i want replace some string from the site but in whole site just find that string and replace with another string. That’s All.

download entire site, find replace, upload entire site. easiest newb way.