General
cancel
Showing results for 
Search instead for 
Did you mean: 

Date search/Replace in bulk files

Ashwin_4
Frequent Advisor

Date search/Replace in bulk files

Hi Masters,
I have 1000 rtf file where i want to change date from 10/07/2006 to 31/07/2006.

How to do this bulk change? kinly help.
2 REPLIES
Phil.Howell
Honored Contributor

Re: Date search/Replace in bulk files

Re: Date search/Replace in bulk files

Ashwin this example may help.

Source.txt (Contains three lines below)
--------------------------------------
10/07/2006 This is sample text
10/07/2006 This is sample text
10/07/2006 This is sample text

Replacer.cmd (Batch file with a single line of script)
--------------------------------------
for /f "tokens=1,* delims= " %%i in (C:\source.txt) do @echo 31/07/2006 %%j >>out.txt

The result will be in out.txt
--------------------------------------
31/07/2006 This is sample text
31/07/2006 This is sample text
31/07/2006 This is sample text