你可以使用powershell。 從this question:
function ProcessWeb($currentWeb)
{
if([Microsoft.SharePoint.Publishing.PublishingWeb]::IsPublishingWeb($currentWeb))
{
$publishingWeb = [Microsoft.SharePoint.Publishing.PublishingWeb]::GetPublishingWeb($currentWeb)
$publishingPages = $publishingWeb.GetPublishingPages()
foreach ($publishingPage in $publishingPages)
{
if($publishingPage.ListItem.File.CheckOutStatus -eq "None")
{
UpdatePage -page $publishingPage
}
}
Write-Host -ForegroundColor red "FINISHED"
}
else
{
Write-Host -Foregroundcolor Red "^ not a publishing site"
}
}
function UpdatePage($page)
{
$page.CheckOut();
Write-Host -Foregroundcolor green $page.Url;
$NewPageContent = $page["PublishingPageContent"].Replace("/place1/place2/link","/place3/place4/link");
$page["PublishingPageContent"] = $NewPageContent
$page.ListItem.Update();
$page.CheckIn("nothing");
$page.ListItem.File.Approve("Updated PublishingPageContent to replate place1/place2 with place3/place4");
}
ProcessWeb(Get-SPWeb -identity http://myintranet.com)
請注意,您將需要制定出一個良好的如何REPLACE語句會工作。 此外,這會自動更改可能出錯的地方,因此請務必先在開發/用戶環境中執行此操作,然後再備份生產中的內容數據庫並最終放棄。
來源
2013-02-14 00:33:44
Nat
如果這些文件位於同一個(或幾個)位置,則應將其複製到您的機器。如果頁面位於庫中,則可以使用資源管理器視圖來複制它們。然後你運行一個改變鏈接的腳本。現在是學習PowerShell(假設你使用Windows)和正則表達式的好時機! – 2013-02-13 23:58:03