Skip to content
Advertisement

Ubuntu shell script – Scanning the drive for archives: ERROR: No more files

I have installed the package

p7zip-full

for ubuntu and I am running the following shell script named 7z and placed within the same directory as the dataset zipped files

#!bin/sh
mkdir ./min6dB
mkdir ./0dB
mkdir ./6dB
7z -omin6dB -y x ./-6_dB_valve.zip
7z -omin6dB -y x ./-6_dB_pump.zip

The dataset folder looks as in the image

enter image description here

and I get the error below

Scanning the drive for archives:

ERROR: No more files

although this certain file exists within my directory. How can I resolve the issue?

I use Ubuntu app for Windows 10.

enter image description here

Advertisement

Answer

Had to rewrite it as below and be very careful with spaces:

#!/bin/sh
mkdir ./min6dB
mkdir ./0dB
mkdir ./6dB
unzip "./-6_dB_pump" -d min6dB
unzip "./-6_dB_valve" -d min6dB
unzip 6_dB_valve -d 6dB
unzip 0_dB_valve -d 0dB
unzip 0_dB_pump -d 0dB
unzip 0_dB_fan -d 0dB
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement