Operating System - Microsoft
1752290 Members
4985 Online
108786 Solutions
New Discussion юеВ

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 2
Phil.Howell
Honored Contributor

Re: Date search/Replace in bulk files

Michael Maher
Advisor

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