Skip to content
⌘ NSIS Forum Archive

Finding file on a disk

4 posts

korba_bm#

Finding file on a disk

Hi

Is there a simple way to find a file on a hard drive and get the path to it?

Thx
korba_bm#
I tried that but I keep getting: Invalid command: ${Locate}

Here is my code:

!include "FileFunc.nsh"

Section "Update SCons"
SectionIn 1
Call updateSCons
${Locate} "C:\Python24" "/L=F /G=1 /M=msvs.py /S=1K" "Foundfile"
MessageBox MB_OK "In section"
SectionEnd

Function Foundfile
MessageBox MB_OK 'Foundfile'
FunctionEnd

Am I doing sth wrong here?
bholliger#
You have to 'initalise' locate by using !insertmacro Locate.


!include "FileFunc.nsh"
!insertmacro Locate

Section
${Locate} ...
: