Author Posts

August 5, 2018 at 8:01 am

Hello everyone,

Basicaly all I need is a script to search for content inside multiple txts that matches column A in csv table. If we got a match replace it with content from column B and save the edited txt.

I write an example below
Inside orange21.txt for example there is a text like this :

"blah blah blah http://www.example.com/orange21.png blah blah blah http://www.example.com/orange21.png blah blah blah."

I have a csv table containing the links that lying inside those texts in column A. In column B I ve got the link I want to swap with.

My excel example:

https://i.redd.it/95pzyxspe4e11.png

After running the script my orange21.txt text should be like this

"blah blah blah http://www.example.com/oceansummer.mp4 blah blah blah http://www.example.com/oceansummer.mp4 blah blah blah."

Is there anyscript that can help me?

August 9, 2018 at 4:09 am

@imneckro – This is Pester Forum. Please post this question in PowerShellQA