bash - Unix - batch file to unzip folder with specific name -
i need batch script unix don't know well.
i have folder , subfolder
a\a1\b\c\file.zip a\a2\b\c\otherfile.zip a\a3\b\c\thirdfile.zip
each zip file contains xml file , text file
the script have 2 things:
- unzip zip files in folder named 'c' of sub folder of 'a' ; unzipped files should stay in same folder in zip
- all unzipped files have xml extension have been renamed
someone can me?
thank much
you can this.
#find folder 'c' , unzip zip files folder in `find ./a -name c -type d`; unzip $folder/data.zip -d $foler; done #find .xml files , change extension .edefg file in `find ./a -name *.xml -type f`; mv "$file" "${file%.xml}.edefg"; done
Comments
Post a Comment