How to make a scanner that scans a batch file?

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
CrossAlex21
Posts: 2
Joined: 29 Oct 2019 08:38

How to make a scanner that scans a batch file?

#1 Post by CrossAlex21 » 16 Apr 2020 10:45

How do I make a scanner that scans for specific strings in a batch file? I though on using "find" command but I don't know if it can use more than just one argument/string.

aGerman
Expert
Posts: 4654
Joined: 22 Jan 2010 18:01
Location: Germany

Re: How to make a scanner that scans a batch file?

#2 Post by aGerman » 16 Apr 2020 13:13

Try to use FINDSTR. It supports multiple search patterns.

Steffen

pieh-ejdsch
Posts: 239
Joined: 04 Mar 2014 11:14
Location: germany

Re: How to make a scanner that scans a batch file?

#3 Post by pieh-ejdsch » 17 Apr 2020 11:59

A simple first checkCMD.cmd that was started, which was created to find corresponding commands, variables, brackets, parameters etc. in batch files, is here.
The output contains the numbers and the line found.
This script can be easily expanded and new parameters and corresponding search terms can be added.

An expanded (but not completed) version of checkCMD.cmd is also available.
This can also output the bracket level. Small tools for debugging the checkCMD.cmd are also integrated in this.
Which you can use in your own batch for debugging
Help in German is included.
No English help is included yet. Maybe I'll still do it.

usage:
checkCMD.cmd /?
checkCMD.cmd myBatchfile.bat
checkCMD.cmd myBatchfile.bat local call goto parenth ForVars Redirect

CrossAlex21
Posts: 2
Joined: 29 Oct 2019 08:38

Re: How to make a scanner that scans a batch file?

#4 Post by CrossAlex21 » 19 Apr 2020 09:34

Thanks everyone for the help :D !

Post Reply