你可以使用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