Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Can you help me with the VBA code equivalent of this command line: findstr /M /G:c:\search\pattern.txt e:\data\activity*.DAT R:\results\found_file_names.txt whe findstr = finds strings /M = print only the filename if a file contains a match /G = get the search strings from the file c:\search\pattern.txt e:\data\activity*.DAT = search all the activity*.DAT files lik activity1.DAT, activity2.DAT, etc. R:\results\found_file_names.txt = this is the file that will contai the results of the search (the results will be just the file names tha contain the search string) With this working, I need to load the results into a spreadsheet. Appreciate it -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In the debug window type instr( and read the popup
----- lothario wrote: ----- Hi, Can you help me with the VBA code equivalent of this command line: findstr /M /G:c:\search\pattern.txt e:\data\activity*.DAT R:\results\found_file_names.txt whe findstr = finds strings /M = print only the filename if a file contains a match /G = get the search strings from the file c:\search\pattern.txt e:\data\activity*.DAT = search all the activity*.DAT files like activity1.DAT, activity2.DAT, etc. R:\results\found_file_names.txt = this is the file that will contain the results of the search (the results will be just the file names that contain the search string) With this working, I need to load the results into a spreadsheet. Appreciate it. --- Message posted from http://www.ExcelForum.com/ |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
see the help on the filesearch object for a VBA method. There may be a
closer equivalent in one of the scripting libraries. -- Regards, Tom Ogilvy "lothario " wrote in message ... Hi, Can you help me with the VBA code equivalent of this command line: findstr /M /G:c:\search\pattern.txt e:\data\activity*.DAT R:\results\found_file_names.txt whe findstr = finds strings /M = print only the filename if a file contains a match /G = get the search strings from the file c:\search\pattern.txt e:\data\activity*.DAT = search all the activity*.DAT files like activity1.DAT, activity2.DAT, etc. R:\results\found_file_names.txt = this is the file that will contain the results of the search (the results will be just the file names that contain the search string) With this working, I need to load the results into a spreadsheet. Appreciate it. --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do you use the equivalent of NOT in text? | Excel Worksheet Functions | |||
EQUIVALENT for this FORMULA , please | Excel Worksheet Functions | |||
equivalent for function , please for help | Excel Worksheet Functions | |||
Maxif equivalent | Excel Worksheet Functions | |||
Lotus Equivalent | Excel Discussion (Misc queries) |