none
Replace date with current date-15 days dynamically in multiple files present in fold RRS feed

  • Question


  • I am completely new to VB scripting and  I am trying to work on a VB script where it is a *(star) delimited file has a multiple lines starts with RTG and 3rd column=TD8  and 
    When that line found I want to replace date part with  currentdate minus 15 days which is (20190421) and it should work for all the files present in folder and also the modified content of file should get write back to respective files .

     temp.txt
    RTG*888*TD8*20180429~
    TWW*888*RD8*20180201-20180201~
    RTG*888*D8*20180429-20180601~
    KCG*888*TD8*20180201-20180201~
    I want the output as below by changing date. Please help. I am looking for VB script to make it work for all files present in that directory

    RTG*888*TD8*20190421~
    TWW*888*RD8*20180201-20180201~
    RTG*888*TD8*20190421-20190421~
    KCG*888*TD8*20180201-20180201~

    Kindly help me out wih a VB Script. 


    • Edited by Shan455 Monday, May 6, 2019 9:10 AM
    • Moved by Bill_Stewart Wednesday, September 4, 2019 9:43 PM This is not "scripts on demand"
    Monday, May 6, 2019 5:08 AM

All replies