Morning all,

I am trying to write a batch file that will search a specified folder for file containing certain keywords in the file name. Once one of those files is found I would like it to search the files content for a keyword. If the keyword is found I would like it to copy the values after the keyword and paste it in an excel spreadsheet.

I have very limited experience with batch files. So, my question is, is this possible? If so, is anyone familar with any good tutorials or links that could help point me in the right direction? Any help or direction would be greatly appreciated!!

Thanks in advance!

5 Years
Discussion Span
Last Post by Reverend Jim

No it does not have to be a batch file. Would you recomend another type?

It will be searching for .txt files.


If you are familiar with VB then you could develop a console app or a vbScript app. The former requires you to download and install VB. The latter can be developed with just notepad. You can run a vbs (vbScript) file just like any other executable. There are objects you can easily create to do folder/file manipulation

set fso = CreateObject("Scripting.FileSystemObject")

and you can also access the Excel object model (create, edit, save Excel spreadsheets)


Awesome! I will look into vbs. Thanks for the help.


Nevermind...Just downloaded the link and see that there is a users guide. I will read over that.


The scripting guy sample scripts will come in handy. Thanks!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.