Discussion Locked

Script, Batch, C++????

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I would like to make a small script or program to run a search on a network share and save all hits to a file. Or even open up MS Find fill in the blanks and leave the results up.

I'm searching \\System123\File321
For "XzY"
then "ZyX"
and then XyZ"

Then onto \\System234\File321
For "XzY"
then "ZyX"
and then XyZ"

Any hints or tips on how I should go about this?

(this is for text within the file, not by file name)

5 replies

by opatzg9

Nortons filefind has the feature which searches any filemask for any words and gives occurences.
You can print the list or print the list to a file. Otherwise writing a program to do so would require very limited programming skills. All you need is a compiler, and a very base understanding of the language. A stand alone basic executable could be written without documentation allowing passed parameters in about 25 lines of code. The basic compiler fills the passed parameters in a command line into the command$ variable which can be broken up into multiple inputs with the instr$() and mid$() commands. So just make your passed parameters the:
inputfile outputfile searchstring
read the file record by record and print matching record to output file,close and exit.
you can error trap or let error out for lack of inputs.
and voila done.

by jlmarmier

I mean for this kind of little application you need to use Winbatch (http://www.winbatch.com. ther is some function where you can easyly put with tests what you need. You can easily manipultate string and many complicated things...
If you buy the Compiler version, you can make executable script without needing a local script interpretor (very useful).
If you are interested, send me your full request (with more explenations) and I will see what I can do for you.

This discussion is closed to new replies.