I have a SharePoint list with a column call "Documentation". The items in that column are hyperlinks to a folder in library. let's say the link goes to http://portal/sites/New/Foo I want to change the URL to http://portal/sites/NewFoo Each item in the list has a different URL...points the same library but different folder. How do I find string in the URL and replace it with something else?
I have a SharePoint list with a column call "Documentation". The items in that column are hyperlinks to a folder in library. let's say the link goes to http://portal/sites/New/Foo I want to change the URL to http://portal/sites/NewFoo
Each item in the list has a different URL...points the same library but different folder. How do I find string in the URL and replace it with something else?
How do I do that in Posh?
Not sure what you meant to paste in there, but it didn't work ;).
But the -replace operator might be what you need.
$newURL = $oldURL -replace "New/Foo","NewFoo"
Is the basic usage.