Advertisement
snowowl78

unzip evey zipin folder

Jan 11th, 2021
663
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.32 KB | None | 0 0
  1. #!bin/bash
  2. #Find all Zips and return ass array for for loop
  3. for file in $(ls $HOME/Path/to/*.zip); \
  4. # unzip all files to destiny
  5. do unzip $file -d $HOME/path/to/destiny/\
  6. # cut extension and then dot delimitedn parts of file to create directory from filename
  7. $(echo $file | cut -f 6 -d '/' | cut -f 1-3 -d '.');\
  8.  done;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement