Further to my recent posts... (1) You need a later version of Gzip specifically for Win32 You can get the Gzip 1.3.11 installer here http://dfn.dl.sourceforge.net/sourceforge/gnuwin32/gzip-1.3.11.exe You need to run it and select an installation directory. By default it will create a subfolder structure under that directory and the gzip.exe will be in a subdirectory called bin. You can leave it there & use the full path in your batch files or move or copy it where you want... I put mine into c:\Program Files\Gzip to make things easier to remember. (2) The copy *.Z *.Y thing does not work. Wildcards are OK for REN but not for COPY. Solution in this batch file, which seems to do the required things... You can delete or comment out (by preceding with REM) the pause statements if you want to run it unattended. They are there to provide a chance to hit CTRL + C and abort the batch during debugging really. (3) This gzip supports wildcards which makes things simpler (4) new code... @echo off REM place this batch file in the top folder REM and run it from there REM remember where we are set topfolder=%CD% if exist "%topfolder%\subdirlist.txt" del "%topfolder%\subdirlist.txt" > nul if exist "%topfolder%\gzipdirlist.txt" del "%topfolder%\gzipdirlist.txt" > nul echo. echo (1) creating list of all sub folders... echo. pause REM get a list of all the subfolders REM under this one and put it in a temp file dir /b /s /ad > "%topfolder%\subdirlist.txt" echo all sub folders... echo. type "%topfolder%\subdirlist.txt" echo. echo (2) finding folders with gzips in them echo. REM in a loop check each one for gzip files REM write folder name to another list if any found for /F "delims==" %%a in ('type "%topfolder%\subdirlist.txt"') do ( cd %%a if exist *.Z echo %%a >> "%topfolder%\gzipdirlist.txt" ) pause echo all sub folders with gzips in... echo. type "%topfolder%\gzipdirlist.txt" echo. pause echo. echo (3) extracting from gzip archives echo. echo ready to start... echo. pause echo. REM for each folder that contains gzips REM enter folder and extract for /F "delims==" %%a in ('type "%topfolder%\gzipdirlist.txt"') do ( cd %%a for /F "delims==" %%b in ('dir /b *.z') do ( echo copying "%%b" to "%%~nb.y" copy "%%b" "%%~nb.y" ) echo. echo expanding gzips in %%a echo. "c:\program files\gzip\gzip.exe" -d -v *.z ren *.Y *.Z ) REM clean up del "%topfolder%\subdirlist.txt" > nul del "%topfolder%\gzipdirlist.txt" > nul REM go back to where we were cd %topfolder% echo. echo (4) Finished echo. pause echo.