batch file to search and replace a string

后端 未结 3 1664
不知归路
不知归路 2021-01-22 19:38

I need a batch file that should search the PC for all files issued today named as \"example.ini\" and replaces a string which will be in the second line of \"example.ini\", it s

3条回答
  •  鱼传尺愫
    2021-01-22 20:26

    On 32 bit windows Edlin (a dos editor) is available.

    12 
    New text
    e
    

    is an edlin script that writes "New text" on line 12 of a file. Type

    edlin
    

    then

    ?
    

    To use

    edlin c:\folder\filename.ext < edlin.script
    

    You must use short filenames. File must be under 64K lines.

提交回复
热议问题