Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: [Batch] Scan a .txt file for a string  (Read 3096 times)

0 Members and 1 Guest are viewing this topic.

liambiscuit

    Topic Starter


    Hopeful

    [Batch] Scan a .txt file for a string
    « on: June 15, 2009, 07:20:55 PM »
    I would like to scan a file, "banned.txt", for a specific string, ex, "Liam". How do I do this, as I am pretty sure there is a command?

    Liam

    EDIT: Also, how do i delete this text. I remember a command in VB.NET that i used, Replace(
    file,
    query,
    replacewith)
    " When the rich wage war its the Poor who die "
            Linkin Park



    Whoever said that nothing is impossible has obviously never tried to slam a revolving door. -- Lauren

    You cannot buy your friends but you can buy them pizza - AzureBlade49

    gh0std0g74



      Apprentice

      Thanked: 37
      Re: [Batch] Scan a .txt file for a string
      « Reply #1 on: June 15, 2009, 08:35:22 PM »
      what have you tried? i will give you a hint. use findstr on the commandline if your requirement is that simple.

      liambiscuit

        Topic Starter


        Hopeful

        Re: [Batch] Scan a .txt file for a string
        « Reply #2 on: June 15, 2009, 09:25:52 PM »
        "findstr /?" in cmd.exe seems like plenty, will post again if more help is needed.
        " When the rich wage war its the Poor who die "
                Linkin Park



        Whoever said that nothing is impossible has obviously never tried to slam a revolving door. -- Lauren

        You cannot buy your friends but you can buy them pizza - AzureBlade49