none
using for loop to print values but want to filter few of them without using findstr function RRS feed

  • Question

  • @echo off & setLocal enableDELAYedeXpansioN

    for /L %%a in (0 1 10) do (

    for /L %%b in (1 1 10) do (

    set X=%%a%%b

    echo. !X!

    )) >>newfile.txt

    rem ----> findstr /V "aaa aa" ABCD.txt > outfile.txt



    :::::::::::::::::Here is the OUTPUT of above code:::::::::::::

    11

    12

    13

    .

    .

    .

    98

    99

    ::::::::::::::::generate many values in text according to the for loop::::::::::



    Hello dear, please note here problem is that i do not want to see same duplicate numbers or few values like (11,22,33....), in text file, due to this we can put findstr to find out and filter it in 2nd new text file, my concern is that is it possible we can do this by using for loop?
    I mean that echo. !X! is displaying results i want to add !X! in another for loop which checks !X! , if it contains 11 or 22 or 55 ... so just skip it and proceed further echo. remaining values in text file.
    • Moved by Bill_Stewart Tuesday, May 8, 2018 6:26 PM Unanswerable drive-by question
    Friday, March 9, 2018 3:17 PM