CD into Folder 10s then do below command to zip each file and delete original find . -maxdepth 1 -type f -name '*.txt' -exec bash -c \ 'zip -Tm "${1%.txt}".zip "$1"' _ {} \;