A versatile script for searching, copying, and unzipping files based on specific patterns. This tool is ideal for organizing files in bulk, especially when dealing with a mix of directories and file types.
- Search for files based on a user-defined pattern.
- Copy matched files to a designated directory.
- Unzip specific files within the designated directory.
Before using the script, ensure you have both parallel
and unzip
installed on your system. If not, you can install them using the following commands:
sudo apt update
sudo apt install parallel unzip
brew install parallel
brew install unzip
Before running the script, you should configure it to match your needs:
-
FILE_PATTERN: Define the file search pattern. Adjust this to match your specific needs. By default, it's set to
"*Sample*"
, which will search for all files containing "Sample" in their names. -
OUTPUT_PARENT_DIR: This is the parent directory where the copied files will be stored. By default, it's
"OutputDirectory"
. Change this name if needed. -
DEST_SUB_DIR: This is the directory inside the
OUTPUT_PARENT_DIR
where the files will be copied to. By default, it's set to a subdirectory namedSubDir
. Adjust this if you have a different naming preference.
- Adjust the configuration parameters in the script as needed.
- Run the script:
./process_files.sh
- Monitor the progress as the script identifies, copies, and unzips files.
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
Distributed under the MIT License. See LICENSE
for more information.