/P# |
Meaning |
Extra Parameters: /1{Parameter1} … /n{Nth Parameter} |
56 |
(DOC, RTF, HTM, TXT) Search and Replace String |
/1 = sTextTofind /2 = TextToReplace found text with /3 = bCaseSensitive ("TRUE" or "FALSE"). Set to "TRUE" for case sensitivity. Must specify /F# with the Special Process File Type Constants |
This special process can be used to search and replace textual content in a single or whole folder of files.
Special Parameters Described in Detail
/1{sTextToFind} Text to find. Required. If you use quotes, it will attempt to find quotes in the file. Therefore, do not use quotes, they are not required.
/2{sTextToReplace} Text to replace. Required. Do not use quotation marks unless you want them as part of the text to replace.
/3{bCaseSensitive} Set to "TRUE" to recognize differences between upper and lower case characters of the /2{sTextToFind} search string.
Additional Notes: You can use ASCII characters to indicate symbols and control characters that otherwise can’t be shown in your search and/or replacement strings. For example, if you want to search for a string that includes a return (‘enter’), you would select the ASCII character [10]LF from the ASCII char listbox. It will display in your string as ©10©. Although you will search for an ‘enter’ with the ASCII linefeed character only ([10]LF), if you want to place an ‘enter’ into the replacement string you must combine the two ASCII characters [13]CR and [10]LF. For example, if you wanted to add returns after each word in the search string ‘this is a string’, your replacement string would look like ‘this ©13© ©10©is ©13© ©10©a ©13© ©10©string’ where the ASCII characters have been selected from the ASCII char listbox.
To create a replacement string that reads ‘1. First item.’ where the 1. is followed by a tab, select [9]TAB to place ©9© into your string. The entire replacement string will appear as ‘1.©9©First item.’
Another useful ASCII character is [32]SPACE.
Note: You don't have to specify Boolean (TRUE/FALSE) parameters that are FALSE. Nor do you have to specify parameters that are empty.
To do a case sensitive search of the file D:\Files\B.RTF for the string "IncorrEctly DONE" and replace all instances with "incorrectly done" and save to D:\Files\C.RTF the following syntax would be used:
ConvertXLS.EXE /S"D:\Files\B.RTF" /T"D:\Files\C.RTF" /P56 /F5 /1IncorrEctly DONE /2incorrectly done /3TRUE
Note: You don't have to specify Boolean (TRUE/FALSE) parameters that are FALSE. Nor do you have to specify parameters that are empty.
The /S and /T switches specify the input and output files respectively. You can optionally keep the input file unchanged by specifying a different name or path for the output file.
To do a case sensitive search of all RTF files within D:\Files\ for the string "IncorrEctly DONE" and replace all instances with "incorrectly done" and save to the D:\Output\ folder following syntax would be used:
ConvertXLS.EXE /S"D:\Files\*.RTF" /T"D:\Output\*.RTF" /P56 /F5 /1IncorrEctly DONE /2incorrectly done /3TRUE