I definitely need to practice my scripting... So far I have the script below which works when one .zip and one flat file are put into the source location. If multiple files are put in it does not execute properly and I am hoping to see if someone can help with a more efficient way. Just to clarify the script needs to scan the source folder for any .zip files, unzip them to a folder of the same name minus the .zip then move new folders to the destination along with any other flat files or non .zip files in the source to a separate location and also delete the original .zip files.
#! /bin/bash cd "/path/to/source/Location" for file in $(ls *.zip); do unzip $file -d $(echo $file | cut -d . -f 1); done mv $(echo $file | cut -d . -f 1) /Destination/for/Unzip rm *.zip mv LOCK* /Destination/For/Flat/Files