on-internet
← Community

Windows Batch script to get filename as input and search the file in a folder location

Stack Overflow ·

I want to create a windows batch file which includes 3 tasks mainly: 1.It will ask for the user input like: Please Enter file name to search: where you have to give a file name and depending on the file name it will search in some specified location. 2.If the file is found ,again it will search for some pattern(e.g-"Error") in that file. 3.Copy 10 lines from the line where the pattern was found and paste the contents into another file. Example: You have entered file name as: DemoFile 1.It will search for DemoFile.log in specified location. 2.If above file is found then it will search for some

Comments

Sign in or sign up to comment and upvote.

No comments yet.