hello,
I need a function to replace some special word with other word in many files.
For example:
replace "$(VERSION)" with "1.0" ,and the word "$(VERSION)" is in many files.It's not easy to change them by hand.🙁
Thanks
how to replace some special word in many files
10 posts
Take a look at the archive, there are some functions wich should handle this for you, e.g. http://nsis.sourceforge.net/archive/...ances=0,11,122
But evtl. (somebody to verify please!) you shouldn't use {} brackets as place holders. Think this is some kind of special char. Take for example @@VERSION@@ zu search and replace...
Mo
But evtl. (somebody to verify please!) you shouldn't use {} brackets as place holders. Think this is some kind of special char. Take for example @@VERSION@@ zu search and replace...
Mo
Thank you
But I want to search files in a directory (and subdirectories) and change the content of the searched files(replace special words).Not just replace word in a string.
But I want to search files in a directory (and subdirectories) and change the content of the searched files(replace special words).Not just replace word in a string.
You can use the following function to find all the files you need:
In the callback function, call the text replacement function.
In the callback function, call the text replacement function.
Or this one:
Search File or Directory (Alternative)
Use "about" the same way as the Kichik one...
(I forgot to put it in my signature! Thanks!)
Search File or Directory (Alternative)
Use "about" the same way as the Kichik one...
(I forgot to put it in my signature! Thanks!)
There are many text file manipulation functions here:
There are two functions to replace text in files:
-Stu
There are two functions to replace text in files:
-Stu
Please, as you (Afrow UK) create much Text Manipulation Pages, create one with the title "Read every byte of a text file" (use "FileRead $var $var2 1", to read each byte), that have a starting and finish point (using FileSeek), the file to read, and to write the result in a string (or in a file if want).
Thanks by the "future help"! 😁
Thanks by the "future help"! 😁
great!
I will search some useful functions in nsis archive. 🙂
Thanks
Richard Xing
I will search some useful functions in nsis archive. 🙂
Thanks
Richard Xing
Originally posted by deguixI'm not sure how you mean?
Please, as you (Afrow UK) create much Text Manipulation Pages, create one with the title "Read every byte of a text file" (use "FileRead $var $var2 1", to read each byte), that have a starting and finish point (using FileSeek), the file to read, and to write the result in a string (or in a file if want).
Thanks by the "future help"! 😁
-Stu
Hehe. I was just a little enthusiastic above normal (refering to "someone to do a function for me")... Maybe is better do not understand...