Iam not a regular programmer, I want a batch file to delete some part of the text on all the lines from a text file.
the sample text is like this.
"Dec 14,2012 00:00:00.123456789"
I want "Dec 14,2012 00:00:00.XXXXXXXXX" the "X" (123456789) deleted from the text in all the lines.
the number lines may vary as per the duration of the log file (ie may be 500 lines and above)
please help..
thanx in advance ....
@echo off & setlocal EnableDelayedExpansion for /F "tokens=1,* delims=." %%j in ('type "MyFile.txt"') do ( set row=%%k set row=!row:~9! echo.!row! ) >> "My.File.new" del "MyFile.txt" ren "MyFile.new" "MyFile.txt"
Thanx for the reply.. but the whole line between the quotes are getting deleted ..
I want only the "123456789" deleted with the remaining text there in the file..
pl help..
@echo off & setlocal EnableDelayedExpansion for /F "tokens=1,* delims=." %%j in ('type "MyFile.txt"') do ( set row=%%k set row=!row:~9! echo.%%j !row! ) >> "My.File.new" del "MyFile.txt" ren "MyFile.new" "MyFile.txt"
Sir, You are really great you have helped me so much. I need to thank you very much..
that was the fitting reply of yours..
