Not at all. The batch file can be launched from anywhere.
Change rawcomp to "c:\bin\rawcomp.exe" or where you have it located and then it will work from anywhere.
The folowing should solve the decompression - test it on sample-folders-and-files that are in a different folder. Change the c:\temp
BTW, is d* the correct syntax for decompression?
@echo off
pushd "c:\temp"
if exist *.huf echo Why are there *.huf files in the main folder? & pause & goto :EOF
for /f "delims=" %%a in ('dir *.huf /b /s /a-d ') do (
echo Working with "%%a"
if exist "%%~dpa\%%~na.rif" "c:\bin\rawcomp.exe" d* "%%a" "%%~dpa\%%~na.rif" "%%~na.raw" & rd /s /q "%%~dpa"
)
popd
pause
No, by d* I meant that the * is the filename of the rif/hup file. So in the following example:
8.hup
the syntax would be
rawcomp d8 ...
I apologize for not making that part clear.
Also, thanks for the note about the original script.