need help

General discussions about Advanced Find and Replace
Post Reply
tobey
Posts: 3
Joined: Thu Sep 01, 2005 12:42 pm

need help

Post by tobey »

hi,

i have thousands of files which contain as good as the same line:

IF EXIST P:\LOCATION\DLF-G\NOW2XP\INSTALL.BAT P:\LOCATION\
DLF-G\NOW2XP\INSTALL.BAT

IF EXIST P:\LOCATION\ABG-B\NOW2XP\INSTALL.BAT P:\LOCATION\
ABG-B\NOW2XP\INSTALL.BAT


IF EXIST P:\LOCATION\MCH-P\NOW2XP\INSTALL.BAT P:\LOCATION\
MCH-P\NOW2XP\INSTALL.BAT

IF EXIST P:\LOCATION\HBG\NOW2XP\INSTALL.BAT P:\LOCATION\HBG\NOW2XP\INSTALL.BA

only these little strings(thick written) are others...

and these lines should be replaced with this line:

IF EXIST P:\WXPINST\PE_INSTALL.BAT P:\WXPINST\PE_INSTALL.BAT

tobey
Posts: 3
Joined: Thu Sep 01, 2005 12:42 pm

Post by tobey »

can nobody help me?

Abacre
Site Admin
Posts: 1223
Joined: Mon Jan 31, 2005 5:32 pm

Post by Abacre »

Hi,

Go to Batch replace tab, check on "Use regular expressions".
Put into the grid, search for:
IF EXIST P:\\LOCATION\\.+\\NOW2XP\\INSTALL\.BAT P:\\LOCATION\\.+\\NOW2XP\\INSTALL\.BAT

(note the search for string is one line).

Replace with:
IF EXIST P:\\WXPINST\\PE_INSTALL.BAT P:\\WXPINST\\PE_INSTALL.BAT

That's all I verified it works perfectly.
Kind regards,
Abacre Limited
http://www.abacre.com
support@abacre.com

tobey
Posts: 3
Joined: Thu Sep 01, 2005 12:42 pm

Post by tobey »

thank you very much...

worked fine

Post Reply