I have a set of subfolders with .gz files buried in them. I need to decompress the files and keep the directory structure the same. I have used
for /f "usebackq" %i in (`dir *.gz /s/b`) do 7za x %i
which will find the files and decompress them but sends the decompressed files to the root of the folder instead of keeping them in the directory they were found. Could someone tell me how I can decompress the files to the folders they were found?