Prev Previous Post   Next Post Next
Old 23rd July 2015, 22:39   #1
pkonduru
Member
 
Join Date: Jul 2015
Posts: 62
Find and replace text in multiple files in a directory

Hi Guys,

I have been trying to replace text in multiple files in a directory but have not been successful. Here is my code. My code only replaces the first file and does not do the replace on the remaining files.

FindFirst $0 $1 "$INSTDIR\tools\*.bat"
FileLoop:

StrCmp $1 "" DoneFileLoop ;Check for no files
DetailPrint $1 ;Print file name

${textreplace::ReplaceInFile} "$INSTDIR\tools\$1" "$INSTDIR\tools\$1" "\jre" "\..\jre" "/S=1 /C=1 /AO=1" $0

FindNext $0 $1 ;Get the next file from the list

goto FileLoop ;Go back to the top and check for no files
DoneFileLoop:
pkonduru is offline   Reply With Quote
 
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Tags
findfirst, nsis, textreplace

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump