In one directory there are the following files:
abc.ncmm_0
abc.ncmm_1
abc.ncmm_2
abc.ncmm_3
abc.ncmm_4
abc.ncmm_5
I wrote a piece of code to display the specified content in each file:
@echo off
for /f "delims=" %%i in ('dir /b /on *ncmm*') do (
for /f "delims=!" %%a in ('findstr ! %%i') do (
echo %%a
)
)
pause
The displayed content is as follows:
<td width=83 align=center rowspan=2>IN102</td> <
<td width=83 align=center rowspan=2>IN103</td> <
<td width=83 align=center rowspan=2>IN104</td> <
<td width=83 align=center rowspan=2>IN105</td> <
<td width=83 align=center rowspan=2>IN105</td> <
<td width=83 align=center rowspan=2>IN106</td> <
There are two IN105 entries. Now I want to delete the file abc.ncmm_3 corresponding to the first IN105, and then merge the remaining files. What exactly should I do? Thanks.
abc.ncmm_0
abc.ncmm_1
abc.ncmm_2
abc.ncmm_3
abc.ncmm_4
abc.ncmm_5
I wrote a piece of code to display the specified content in each file:
@echo off
for /f "delims=" %%i in ('dir /b /on *ncmm*') do (
for /f "delims=!" %%a in ('findstr ! %%i') do (
echo %%a
)
)
pause
The displayed content is as follows:
<td width=83 align=center rowspan=2>IN102</td> <
<td width=83 align=center rowspan=2>IN103</td> <
<td width=83 align=center rowspan=2>IN104</td> <
<td width=83 align=center rowspan=2>IN105</td> <
<td width=83 align=center rowspan=2>IN105</td> <
<td width=83 align=center rowspan=2>IN106</td> <
There are two IN105 entries. Now I want to delete the file abc.ncmm_3 corresponding to the first IN105, and then merge the remaining files. What exactly should I do? Thanks.
