Skip to content
⌘ NSIS Forum Archive

Locate plugin can't find files starting with _?

2 posts

empezar#

Locate plugin can't find files starting with _?

Hello!

My script can't find a file in a folder that is named "_notfound.jpg".

Pretty annoying stuff. Or am I doing it wrong?

# Add all files within levelshots directory
${locate::Open} "$INSTDIR\qtv\levelshots" "/F=1" $R0
${locate::Find} $R0 $0 $1 $2 $3 $4
${DoUntil} $1 == ""
${locate::Find} $R0 $0 $1 $2 $3 $4
${If} $1 != ""
${StrStrip} "$INSTDIR\" "$0\$1" $R1
FileWrite $INSTLOG "$R1$\r$\n"
${EndIf}
${LoopUntil} $1 == ""
empezar#
I figured out what the problem was.

The first "locate" didn't have any actions attached to it. So it simply skipped the first file in the list, which was the file starting with _.

Move along... 🙂