Đã hoàn thành

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





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




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.

Kĩ năng: .NET, Bất kì công việc gì, Perl, Thiết lập Bản thảo, Visual Basic

Xem nhiều hơn: 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, nested, save file directory, top recursive, text drive, find files directory

Về Bên Thuê:
( 57 nhận xét )

ID dự án: #1905402

Được trao cho:


Please see PMB

$35 USD trong 1 ngày
(38 Đánh Giá)