My requirement here is to remove some specific text from a file and copy those contents and craete a new file.
input file is the filename where my filename is based on date and time, since I need to read today's file, im ignoring time and reading the file with *.
But while finding the string in those file is copying the text to the filename..I dont want my new copied file having those text..But currenly my output contains below. I want to remove that text (ie my file name)
Y:\NAS\EODReport\CAT Channels Audit Report_26102016.txt:180141 Deposit 510001751 0008800050067 50.00 016R 2016-10-05 11:44:50 006518
Y:\NAS\EODReport\CAT Channels Audit Report_26102016.txt:180142 Check 880036 051404260 0000155348836 98 50.00* 016R 2016-10-05 11:44:50 006518
Code: Select all
@echo off
set Mth=%Date:~4,2%
set Day=%Date:~7,2%
set Yr=%Date:~10,4%
set TODAY=%Day%%Mth%%Yr%
ie my question is how to copy the contents in modifiedTGFile (the contents without those text Transaction Gateway Item Listing Creation Amount Seq Y: ) and the filename "Y:\NAS\EODReport\\"CAT Channels Audit Report_%TODAY%**.TXT\"
set inputfile=Y:\NAS\EODReport\\"CAT Channels Audit Report_%TODAY%**.TXT\"
FINDSTR /V "Transaction Gateway Item Listing Creation Amount Seq Y:" %inputfile%> modifiedTGFile.txt