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!

Does it have to be a batch file?
What is the type of files you are searching for ?

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.

If you need any tips post a thread in the vb.net forum. I spend a lot of time there.

For some reason, the two help files don't come with Windows 7. Here they are.

I tried attaching the files through Firefox and through Internet explorer. Couldn't do it either way. Sorry.

Let's try the attach again. Nope. Still couldn't attach it.

Do you know of any good VBscript tutorials?

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!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.