The Perl script batchReplace. pl can be used to swap text/code in files in batches. You can search for the specified type of files in the specified directory and check the subdirectories in a step-by-step manner. copy the directory structure of the input files when outputting the files.
The Perl script batchReplace. pl can be used to swap text/code in files in batches. You can search for the specified type of files in the specified directory and check the subdirectories in a step-by-step manner. copy the directory structure of the input files when outputting the files.
The win32utility program batchreplace.exe is a executable program compiled by a Perl script. it can be executed without installing the Perl runtime environment.
Apply in command line
BatchReplace.exe [-I file import path (or directory containing the file)] [-o output file status (file or directory)] [-c expand the name of the batch import file, with ". "Start, multiple extended names are separated by" | ".] [-m matching mode] [-I (uppercase/lowercase letters that are not matched)] [-G (global search for the content to be matched)] [-e exception string is a supplement to the matching mode. if such a string is found in the matching result, do not match] [-r change content]
The preceding parameters have no order restrictions. When the file path involved by the-o parameter does not exist, it is automatically created. When the output file already exists, the original content of the file will be overwritten. (For security reasons, do not output data to the original position of the input file to avoid irreparable loss .)
For example:
BatchReplace.exe-I d: \ gaoshu1-o d: \ do \ 123 \ 456-e http://www.blueidea.com/
Set parameters through the configuration file batchReplace. set
The configuration file may contain the following configuration items (case-sensitive ):
Input = E: \ fna \ specifies the Input path, which is equivalent to the default value of the command line parameter-I.
-I = E: \ fna \ same as above.
Output = E: \ DNA walks \ specifies the pre-input path, which is equivalent to the default value of the command line parameter-o.
-O = E: \ DNA walks \ same as above.
Match = uuuuuuuuu
Yyyyyyyyyyyyyyyyyyyyyyyy
Wwwwwwwwwwwwwwwwwww
Uuuuuuuuuu
Yyyyyyyyyyyyyyyyyyyyyyyy
Place the configuration file batchReplace. set and batchReplace.exe in the same directory.
Reference:
Match = uuuuuuuuu
Yyyyyyyyyyyyyyyyyyyyyyyy
Wwwwwwwwwwwwwwwwwww
Uuuuuuuuuu
Yyyyyyyyyyyyyyyyyyyyyyyy