Terminé

159213 Text file search script

Need a script to find sentences or lines in a directory of text files on a hard drive and save the searched terms to a new text file with that name. Must be able to search recursive nested folders.

For example, a hard drive directory is called /archives/ and in it are 4 subdirectories called

/archives/1990/

/archives/1995/

/archives/1999/

/archives/2003/

In each folder named after a year there are 12 monthly titled folders

/archives/1990/Jan/

/archives/1990/Feb/

...

In every level of subdirectory there are numerous text files. We need a script to search all these files for a specific term (like blue widgets) and save the sentences or lines (if there is a line break) where that term is found in a text file called "blue [url removed, login to view]" in the top directory searched (/archives/). It will search for all instances of the keyword(s) in the sentence. In the above example, it would retrieve and format the results as follows:

blue [url removed, login to view]

Sales results of blue widgets.

Blue and red widget customers.

Blue widgets sold by quarter.

blue widgets

To recap, your program will have two variables - folder to search for and search term. It will search each sentence or line in a text file and save that line or sentence in a text file named after the search term.

Doesn't matter what language the script is written in as long as it works without crashing or hanging. There are hundreds of text files in each directory.

Compétences : .NET, Tout va bien, Perl, Script Install, Visual Basic

en voir plus : what is recursive, search red, search for red, sales folder, red search, recursive program example, perl search script, search search, search for search for, visual search, text file, search for files, recursive, find files in directory, file folder, blue found, monthly recap, perl keyword, drive script, search terms

Concernant l'employeur :
( 57 commentaires )

Nº du projet : #1905402

Décerné à:

ebson

Please see PMB

%selectedBids___i_sum_sub_4% %project_currencyDetails_sign_sub_5% USD en 1 jour
(38 Commentaires)
4.9