#!/bin/bash
#Задаем переменную директори
#Если в директории имеются файл. Ключ -f проверяет наличие файлов
#if [ -f ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/jeans-optom.txt ]&&[ -d ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/orig/jeans-optom ]; then echo "Текущая папка: "&& cd ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/orig && echo $PWD && rm archive/jeans-optom.zip && nice -n 10 zip -r -m archive/jeans-optom.zip jeans-optom/* && cd .. &&rm jeans-optom.txt && cd; fi; if [ -f ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/skidki-i-rasprodazhi_zn.txt ]&&[ -d ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/orig_zn/skidki-i-rasprodazhi ]; then echo "Текущая папка: "&& cd ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/orig_zn && rm archive/skidki-i-rasprodazhi.zip && echo $PWD && nice -n 10 zip -r -m archive/skidki-i-rasprodazhi.zip skidki-i-rasprodazhi/* && cd .. &&rm skidki-i-rasprodazhi_zn.txt && cd ; fi;
cd; if [ -f ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/kurtki.txt ]&&[ -d ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/orig/kurtki ]; then echo "Текущая папка: "&& cd ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/orig && echo $PWD && if [ -f ~/archive/kurtki.zip ]; then rm archive/kurtki.zip; fi && nice -n 10 zip -r -m archive/kurtki.zip kurtki/* && cd .. &&rm kurtki.txt && cd; fi; if [ -f ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/kurtki_zn.txt ]&&[ -d ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/orig_zn/kurtki ]; then echo "Текущая папка: "&& cd ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/orig_zn && echo $PWD && if [ -f ~/archive/kurtki.zip ]; then rm archive/kurtki.zip; fi && nice -n 10 zip -r -m archive/kurtki.zip kurtki/* && cd .. &&rm kurtki_zn.txt && cd ; fi;if [ -f ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/kostyumyi.txt ]&&[ -d ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/orig/kostyumyi ]; then echo "Текущая папка: "&& cd ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/orig && echo $PWD && if [ -f ~/archive/kostyumyi.zip ]; then rm archive/kostyumyi.zip; fi && nice -n 10 zip -r -m archive/kostyumyi.zip kostyumyi/* && cd .. &&rm kostyumyi.txt && cd; fi; if [ -f ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/kostyumyi_zn.txt ]&&[ -d ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/orig_zn/kostyumyi ]; then echo "Текущая папка: "&& cd ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/orig_zn && echo $PWD && if [ -f ~/archive/kostyumyi.zip ]; then rm archive/kostyumyi.zip; fi && nice -n 10 zip -r -m archive/kostyumyi.zip kostyumyi/* && cd .. &&rm kostyumyi_zn.txt && cd ; fi;if [ -f ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/palto.txt ]&&[ -d ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/orig/palto ]; then echo "Текущая папка: "&& cd ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/orig && echo $PWD && if [ -f ~/archive/palto.zip ]; then rm archive/palto.zip; fi && nice -n 10 zip -r -m archive/palto.zip palto/* && cd .. &&rm palto.txt && cd; fi; if [ -f ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/palto_zn.txt ]&&[ -d ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/orig_zn/palto ]; then echo "Текущая папка: "&& cd ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/orig_zn && if [ -f ~/archive/palto.zip ]; then rm archive/palto.zip; fi && echo $PWD && nice -n 10 zip -r -m archive/palto.zip palto/* && cd .. &&rm palto_zn.txt && cd ; fi;if [ -f ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/bryuki.txt ]&&[ -d ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/orig/bryuki ]; then echo "Текущая папка: "&& cd ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/orig && echo $PWD && if [ -f ~/archive/bryuki.zip ]; then rm archive/bryuki.zip; fi && nice -n 10 zip -r -m archive/bryuki.zip bryuki/* && cd .. &&rm bryuki.txt && cd; fi; if [ -f ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/bryuki_zn.txt ]&&[ -d ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/orig_zn/bryuki ]; then echo "Текущая папка: "&& cd ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/orig_zn && if [ -f ~/archive/bryuki.zip ]; then rm archive/bryuki.zip; fi && echo $PWD && nice -n 10 zip -r -m archive/bryuki.zip bryuki/* && cd .. &&rm bryuki_zn.txt && cd ; fi;if [ -f ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/shortyi-optom.txt ]&&[ -d ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/orig/shortyi-optom ]; then echo "Текущая папка: "&& cd ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/orig && echo $PWD && if [ -f ~/archive/shortyi-optom.zip ]; then rm archive/shortyi-optom.zip; fi && nice -n 10 zip -r -m archive/shortyi-optom.zip shortyi-optom/* && cd .. &&rm shortyi-optom.txt && cd; fi; if [ -f ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/shortyi-optom_zn.txt ]&&[ -d ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/orig_zn/shortyi-optom ]; then echo "Текущая папка: "&& cd ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/orig_zn && if [ -f ~/archive/shortyi-optom.zip ]; then rm archive/shortyi-optom.zip; fi && echo $PWD && nice -n 10 zip -r -m archive/shortyi-optom.zip shortyi-optom/* && cd .. &&rm shortyi-optom_zn.txt && cd ; fi;if [ -f ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/tolstovki.txt ]&&[ -d ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/orig/tolstovki ]; then echo "Текущая папка: "&& cd ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/orig && echo $PWD && if [ -f ~/archive/tolstovki.zip ]; then rm archive/tolstovki.zip; fi && nice -n 10 zip -r -m archive/tolstovki.zip tolstovki/* && cd .. &&rm tolstovki.txt && cd; fi; if [ -f ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/tolstovki_zn.txt ]&&[ -d ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/orig_zn/tolstovki ]; then echo "Текущая папка: "&& cd ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/orig_zn && if [ -f ~/archive/tolstovki.zip ]; then rm archive/tolstovki.zip; fi && echo $PWD && nice -n 10 zip -r -m archive/tolstovki.zip tolstovki/* && cd .. &&rm tolstovki_zn.txt && cd ; fi;if [ -f ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/skidki-i-rasprodazhi.txt ]&&[ -d ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/orig/skidki-i-rasprodazhi ]; then echo "Текущая папка: "&& cd ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/orig && echo $PWD && if [ -f ~/archive/skidki-i-rasprodazhi.zip ]; then rm archive/skidki-i-rasprodazhi.zip; fi && nice -n 10 zip -r -m archive/skidki-i-rasprodazhi.zip skidki-i-rasprodazhi/* && cd .. &&rm skidki-i-rasprodazhi.txt && cd; fi; if [ -f ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/skidki-i-rasprodazhi_zn.txt ]&&[ -d ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/orig_zn/skidki-i-rasprodazhi ]; then echo "Текущая папка: "&& cd ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/orig_zn && if [ -f ~/archive/skidki-i-rasprodazhi.zip ]; then rm archive/skidki-i-rasprodazhi.zip; fi && echo $PWD && nice -n 10 zip -r -m archive/skidki-i-rasprodazhi.zip skidki-i-rasprodazhi/* && cd .. &&rm skidki-i-rasprodazhi_zn.txt && cd ; fi;   if [ -f ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/shapki.txt ]&&[ -d ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/orig/shapki ]; then echo "Текущая папка: "&& cd ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/orig && echo $PWD && if [ -f ~/archive/shapki.zip ]; then rm archive/shapki.zip; fi && nice -n 10 zip -r -m archive/shapki.zip shapki/* && cd .. &&rm shapki.txt && cd; fi; if [ -f ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/shapki_zn.txt ]&&[ -d ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/orig_zn/shapki ]; then echo "Текущая папка: "&& cd ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/orig_zn && if [ -f ~/archive/shapki.zip ]; then rm archive/shapki.zip; fi && echo $PWD && nice -n 10 zip -r -m archive/shapki.zip shapki/* && cd .. &&rm shapki_zn.txt && cd ; fi;   if [ -f ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/perchatki.txt ]&&[ -d ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/orig/perchatki ]; then echo "Текущая папка: "&& cd ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/orig && echo $PWD && if [ -f ~/archive/perchatki.zip ]; then rm archive/perchatki.zip; fi && nice -n 10 zip -r -m archive/perchatki.zip perchatki/* && cd .. &&rm perchatki.txt && cd; fi; if [ -f ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/perchatki_zn.txt ]&&[ -d ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/orig_zn/perchatki ]; then echo "Текущая папка: "&& cd ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/orig_zn && if [ -f ~/archive/perchatki.zip ]; then rm archive/perchatki.zip; fi && echo $PWD && nice -n 10 zip -r -m archive/perchatki.zip perchatki/* && cd .. &&rm perchatki_zn.txt && cd ; fi;if [ -f ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/jeans-optom.txt ]&&[ -d ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/orig/jeans-optom ]; then echo "Текущая папка: "&& cd ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/orig && echo $PWD && if [ -f ~/archive/jeans-optom.zip ]; then rm archive/jeans-optom.zip; fi && nice -n 10 zip -r -m archive/jeans-optom.zip jeans-optom/* && cd .. &&rm jeans-optom.txt && cd; fi;if [ -f ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/shapki_zn.txt ]&&[ -d ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/orig_zn/shapki ]; then echo "Текущая папка: "&& cd ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/orig_zn && echo $PWD && if [ -f ~/archive/shapki.zip ]; then rm archive/shapki.zip; fi && nice -n 10 zip -r -m archive/shapki.zip shapki/* && cd .. &&rm shapki_zn.txt && cd ; fi;if [ -f ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/shortyi-optom.txt ]&&[ -d ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/orig/shortyi-optom ]; then echo "Текущая папка: "&& cd ~/web/mtforce.hetz.mtf.bz/public_html/cont/media_volm/img_arch/orig && echo $PWD && if [ -f ~/archive/shortyi-optom.zip ]; then rm archive/shortyi-optom.zip; fi && nice -n 10 zip -r -m archive/shortyi-optom.zip shortyi-optom/* && cd .. &&rm shortyi-optom.txt && cd; fi;