Page 1 of 1

Can we search and replace in multiple files?

Posted: Fri Sep 25, 2009 3:29 pm
by jimbo2112
Hi All,

I need to do S&R in multiple files. ctrl-f5 does not cover replace, only find!

Many thanks

It's just a simple string, reg-ex is not needed.

Thanks!

Jimbo

Posted: Sat Sep 26, 2009 4:13 pm
by Bob Hansen
A hot key cannot do S/R without knowing the S/R values. Must do this manually. Could make into a macro if need the same process repeatedly.

Open the files that need the S/R

From the Main Menu, click on Search, click on Replace
In the Replace window:
1. fill in the Find what string
2. Fill in the Replace with string
3. Put a check mark in the box for Scope: All documents
4. Click on Replace All.

Status bar at lower left will show the total number of replacements.

Posted: Mon Sep 28, 2009 10:31 am
by jimbo2112
Hi Bob,

What I was looking for was something more like a ctrl f8 key to complement the ctrl f5. There's a search in files, but no search and replace. I would do the replace over multiple files by opening them all, but I literally have thousands of small XML files which need the routine performed on them.

Any other ideas? I would have done this in Perl back along when I have it on my PC and could remember the syntax!

Thanks for the help so far!

Jimbo

Posted: Fri Oct 16, 2009 9:32 pm
by acastles
Do your search first, then right click the results and choose "Open All", and then do your search and replace with Scope set to "All documents".

This has worked well for me for year. Only have had problems if there have been hundreds of files to change as they all need to be open at the same time but if necessary you can select smaller groups of files (say 100 at a time) and do the replace in various passes.

Hope that helps!

Andy