How to decompress files using gunzip?

I have compressed files under directory '/root/data' and i need the uncompressed files in another directory
'/root/uncom'. I running a shell script below shell script from directory '/root/'

gunzip /root/data/*.gz -d /root/uncom

But this is failing with :

gunzip: /root/uncom is a directory -- ignored

Greetings,
You did not mention your OS, many open sources can have differences depending on architecture... check the man pages.
Here -d to me as gunzip is similar to gzip -d I understand it as decompress and so explains the error message you get:

gunzip: /root/uncom is a directory -- ignored

you did not mention how you zipped your files, if you have files with gz extensions, copying them in the destination directory and unzipping them there using

gunzip * or *.gz

should suffice

for FILE in *.gz
do
        echo gunzip '<' "$FILE" '>' "/path/to/folder/${FILE/.gz/}"
done

Remove the echo and the single-quotes around < > once you have tested and know the filenames / locations are what you want.