Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: batch program + Find and replace  (Read 1263 times)

0 Members and 1 Guest are viewing this topic.


    Topic Starter


    • Experience: Beginner
    • OS: Windows 7
    batch program + Find and replace
    « on: June 03, 2015, 04:48:37 AM »
    I have file which has some lines.. e.g.

    line no 20    # Every Vagrant virtual environment requires a box to build off of.
    line no 21         config.vm.box = "test_15_4"
    line no 22    # The url from where the 'config.vm.box' box will be fetched if it
    line no 23    config.vm.box_url = "file:\\d:\\images\\test.box"

    I have set a variable "replace = test_15_5".. and "Search = config.vm.box"

    I need a batch code which will search "config.vm.box" in file and replace next string "test_15_4"  with %replace%.. Code should replace every occurrence in file.

    Need this urgently... please help me...