Simpler Navigation for Servers and Operating Systems
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
Operating System - Microsoft
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