Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > microsoft.public.scripting.vbscript > #11362

Re: script to search list of strings in files/directories

Newsgroups microsoft.public.scripting.vbscript
Subject Re: script to search list of strings in files/directories
From "Evertjan." <exxjxw.hannivoort@inter.nl.net>
References <422e8189-83a1-48a9-a327-59e2726d0929@googlegroups.com>
Date 2016-08-30 10:52 +0200
Message-ID <XnsA6746EA4C3F7Feejj99@194.109.6.166> (permalink)

Show all headers | View raw


zmau1962@gmail.com wrote on 30 Aug 2016 in
microsoft.public.scripting.vbscript: 

> General description of the problem : I have a DLL which exports many
> functions. I want to check which of those exported functions are the
> functions that are actually in use (in the source code of an application
> that uses this DLL). 
> 
> So here is the same question in details :
> 
> I have a file (MyFuncs.h) which contains a many lines of the which looks
> like : 
> 
> MY_API  int function_0(int param_0);    // Descriptiom_0
> MY_API  int function_1(int param_1, int param_1);    // Descriptiom_1
> MY_API  int function_2();    // Descriptiom_0  djdjdjd 
> MY_API  int function_3(void);    // Descriptiom_0  s''s's
> Comment: The function name is ALWAYS the third word.
> 
> I have a directory named C:\MyDir which contains many files of source
> (*.cpp and *.h). 
> 
> I need a script that searches for the "all of the functions" in
> C:\MyDir*.cpp and also in C:\MyDir*.h 
> 
> Does anybody know how to help? Any scripting language is good,

This NG is about VBScript, ask in other NGs for other languages.

> as long as it runs on Windows_7 (WinXP could be nice). 
> 
> Any advice ?

Using wscript:

- get each file using Scripting.FileSystemObject 
- test each line with regex and output to the window
  or to a resultfile.

-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Back to microsoft.public.scripting.vbscript | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

script to search list of strings in files/directories zmau1962@gmail.com - 2016-08-30 00:29 -0700
  Re: script to search list of strings in files/directories "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-08-30 10:52 +0200
  Re: script to search list of strings in files/directories "Mayayana" <mayayana@invalid.nospam> - 2016-08-31 14:22 -0400
    Re: script to search list of strings in files/directories Mau Z <zmau1962@gmail.com> - 2016-08-31 13:05 -0700
      Re: script to search list of strings in files/directories "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-08-31 22:16 +0200
        Re: script to search list of strings in files/directories "Mayayana" <mayayana@invalid.nospam> - 2016-08-31 16:39 -0400
          Re: script to search list of strings in files/directories "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-08-31 22:52 +0200
            Re: script to search list of strings in files/directories "Mayayana" <mayayana@invalid.nospam> - 2016-08-31 20:54 -0400
              Re: script to search list of strings in files/directories "Dave \"Crash\" Dummy" <invalid@invalid.invalid> - 2016-08-31 22:39 -0400
                Re: script to search list of strings in files/directories "Mayayana" <mayayana@invalid.nospam> - 2016-09-01 10:03 -0400
                Re: script to search list of strings in files/directories "Dave \"Crash\" Dummy" <invalid@invalid.invalid> - 2016-09-01 11:09 -0400
                Re: script to search list of strings in files/directories "Mayayana" <mayayana@invalid.nospam> - 2016-09-01 12:45 -0400
                Re: script to search list of strings in files/directories "Dave \"Crash\" Dummy" <invalid@invalid.invalid> - 2016-09-01 13:41 -0400
                Re: script to search list of strings in files/directories "Mayayana" <mayayana@invalid.nospam> - 2016-09-01 15:19 -0400
      Re: script to search list of strings in files/directories "R.Wieser" <address@not.available> - 2016-09-01 09:25 +0200
        Re: script to search list of strings in files/directories Mau Z <zmau1962@gmail.com> - 2016-09-05 07:36 -0700
  Re: script to search list of strings in files/directories "Dave \"Crash\" Dummy" <invalid@invalid.invalid> - 2016-09-01 14:35 -0400
    Re: script to search list of strings in files/directories Mau Z <zmau1962@gmail.com> - 2016-09-05 07:21 -0700
      Re: script to search list of strings in files/directories "Dave \"Crash\" Dummy" <invalid@invalid.invalid> - 2016-09-05 14:43 -0400
      Re: script to search list of strings in files/directories "Dave \"Crash\" Dummy" <invalid@invalid.invalid> - 2016-09-05 14:54 -0400
        Re: script to search list of strings in files/directories "Dave \"Crash\" Dummy" <invalid@invalid.invalid> - 2016-09-05 15:41 -0400
          Re: script to search list of strings in files/directories Mau Z <zmau1962@gmail.com> - 2016-09-05 13:07 -0700
          Re: script to search list of strings in files/directories Mau Z <zmau1962@gmail.com> - 2016-09-05 13:09 -0700
            Re: script to search list of strings in files/directories "Dave \"Crash\" Dummy" <invalid@invalid.invalid> - 2016-09-06 11:33 -0400
  Re: script to search list of strings in files/directories Dr J R Stockton <reply1600@merlyn.demon.co.uk.invalid> - 2016-09-07 23:43 +0100

csiph-web