I had to change a few things (fi is used instead of endif, and using ls -p made new directories with 7zip instead of just spitting out the file), but that works great. Much better than the weird crap I was trying to pull off with arrays, anyway. Thanks.