Sanity check

rated by 0 users
This post has 1 Reply | 2 Followers

Not Ranked
Posts 1
slkrck Posted: 04-19-2012 1:11 PM

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?

Top 10 Contributor
Posts 640

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.

Page 1 of 1 (2 items) | RSS
Copyright 2012 PowerShell.com. All rights reserved.