File Text Search Script
Description
The FileTextSearch.py script is a utility designed to search for a specific keyword or phrase within text-based files located in a specified directory. The script searches through files with the following extensions: .txt, .docx, and .pdf. It can recursively search through subdirectories, making it easier to locate documents containing the desired information.
Features
- Recursive Searching: The script can search within specified subdirectories.
- Keyword Matching: Users can input a keyword or phrase to find within the text files.
- Supported Formats: The script can read
.txt,.docx, and.pdffile formats.
Usage
- Ensure you have Python installed on your machine.
- Download the
FileTextSearch.pyscript. - Open a terminal or command prompt and navigate to the directory where the script is located.
- Run the script using the following command: python FileTextSearch.py
- When prompted, enter the path of the directory you want to search. Enter path: /path/to/your/directory
- Enter the keyword or phrase you want to search for in the files. Keyword/Phrase: your_keyword
- The script will search through the specified directory and print out the names of any files where the keyword is found.
Requirements
- Python 3.x
- Basic understanding of file paths in your operating system.
- The script will read text-based files, so ensure the files are not encrypted or password protected.
License
This script is open-source and free to use. Feel free to modify and distribute as needed.
Contributing
If you'd like to contribute to this project, please open an issue or submit a pull request with your proposed changes or enhancements.