Multiple .gz decompress files and dump other directory

I have code below

for i in *.gz; do gzip -dc $i /home/vizion/Desktop/gzipfile/; done

one more

for i in *.gz; do gunzip -dc $i /home/vizion/Desktop/gzipfile/; done

both are getting error: "

gunzip: /home/vizion/Desktop/gzipfile/ is a directory -- ignored 

"

i have requirement below
in directory there is multiple .gz file in directory for example /opt
files like

adn_DF9D_20140515_0001.log.gz
adn_DF9D_20140515_0002.log.gz
adn_DF9D_20140515_0003.log.gz

I need to decompress above files after decompress need to be sent /gzipfile/ directory

suggest to me how to approach this

So you know the problem. It should be a filename and not directory name.
Also, in that way, you are actually trying to decompress the directory also (and not storing the decompressed files to that directory which I think you want to)
check man gzip or man gunzip for details.

Basically, you need to

for i in *.gz
do
 gzip -dc $i > /location/of/unzipped/files/individual_file_name.txt
done

In your case,

for i in *.gz
do
 gzip -dc $i > /home/vizion/Desktop/gzipfile/${i%.gz}
done

I assumed you are executing the script from the current directory. Otherwise, $i would contain absolute paths and you need to handle that as well.

Also, you dont need to use -d with gunzip . gunzip = gzip -d

When i am running the script it's working as expected. but when i am given absolute path of .gz files getting the error "./exa2: line 2: /home/vizion/Desktop/gzipfile//home/vizion/Desktop/*: No such file or directory"

code as below

#!/bin/sh
for i in '/home/vizion/Desktop/*.gz' ; do gzip -dc $i > /home/vizion/Desktop/gzipfile/${i%.gz} ; done

Suggest to me how avoid above error

You should NOT use the quotes as they wont be expended as wildcard (*). The above would loop only once containing /home/vizion/Desktop/*.gz in $i hence that error.

For absolute path, I already asked you to work on that if required. You need to extract the filename from the path.

Anyway,

for i in /home/vizion/Desktop/*.gz
do
 fname=${i##*/}
 fname_without_gz=${fname%.gz}
 gzip -dc $i > /home/vizion/Desktop/gzipfile/${fname_without_gz%.gz}
done

I have used multiple variable for readability. You can override the same variable if you want.