Archive: What is wrong with my FindFirst call?


What is wrong with my FindFirst call?
Please help me to find what is wrong in the following scripts?

FindFirst $0 $1 "..\Share\Help\*.*"
DetailPrint "$1"
loop:
StrCmp $1 "" done
${{If}} ${{FileExists}} "$1\*.*"
DetailPrint "Subdir found: $1"
SetOutPath "$INSTDIR\Help\$1\PPP"
CopyFiles $1\*.zip $OUTDIR
nsisunz::Unzip $INSTDIR\Help\$1\PPP\*.zip $INSTDIR\Help\$1
${{EndIf}}
FindNext $0 $1
Goto loop
done:
DetailPrint "no Subdir found."
FindClose $0

I am trying to get all subfolders in Help folder and then unzip the zip file in each subfolder to another sbfolder PPP. Every time when I run the scripts, I always get "no Subdir found."


FindFirst documentation says the filename returned is without a path, so it's unlikely that ${If} ${FileExists} "$1\*.*" will exist. Try ${If} ${FileExists} "..Share\Help\$1\*.*" and also modify the copyfiles line.

(I hope the extra curly brackets ${{...}} are a typo in the post above).


Also, I would expect that you need to supply a full path to FindFirst.