Created
July 9, 2020 20:35
-
-
Save AnmolTomer/acbcfdb5501deaa24cac5be8269c79bb to your computer and use it in GitHub Desktop.
Takes download links from a txt file, makes a folder same as directory name, puts all the downloads in the dir and upon completion put all the files inside zip and save the structure with file size inside a tree.txt. Does this for all txt present in path.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for file in ./* ; do | |
dir=$(basename $file .txt) | |
mkdir $dir | |
cd $dir | |
wget -i "../${file}" | |
tree -h -D -o "${dir}_tree.txt" . | |
zip -r "${dir}.zip" . | |
rm *.pdf | |
cd .. | |
dir="" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment