Say if I have a folder ‘images’ and inside it there are 0001.zip to 9999.zip, I want to unzip all of them and save them in subfolder which has their file name, for example, 0001.zip will be unzipped and saved to /0001, 0002.zip will be unzipped and saved to /0002, I tried to do
unzip '*.zip'
but that extracts all files in current folder.
You could do something like this:
or, run it together on one line:
If you need/want to keep the original .zip files, just remove the
&& rm ../"$file"bit.