lets say that I have a folder containing 250 more folders (f1,..f250) and I want to zip each of these 250 folders into an individual zip-file that is password protected. I found this answer with the following code
for i in * ; do zip -vr "$i.zip" "$i" ; mv "$i.zip" /move/zipfiles/here/ ; done
and tried to adapt that to my situation combining it with
7z a archive.7z -psecret -mhe *.txt
which I found here. My result so far
for i in * ; do 7z a "$i.zip" -ppassword "$i" ; done
This does create multiple zip files that are named f1.zip,...f250.zip but each of these zip files is empty. If I run the single command
7z a f1.zip -ppassword f1
everything gets packed correctly. Can anyone point out where I am going wrong?