News:

MultiCommander v16.6 is released!

Main Menu

replace the string inside file

Started by causative, September 12, 2014, 13:09:06

Previous topic - Next topic

causative

Is it possible in MC to replace the string in file without opening it ( manualy we open the file, press  ctrl + h and replace the string "aaa" to "bbb" )
I would like to use it in many files at the same time.

Mathias (Author)

From Script it is possible

@var $text = LoadStringFromFile( "R:\\file.txt" );
$text = StrReplace($text, "hulk" , "thor");
SaveStringToFile("R:\\file.txt", $text, 0);


And you can expand the script to so it asks for what it should find and replace it with..