【问题标题】:Powershell 1.0 - loop to replace text in aspx file will not workPowershell 1.0 - 循环替换 aspx 文件中的文本将不起作用
【发布时间】:2014-07-11 16:17:34
【问题描述】:

我有循环:

Get-ChildItem 'C:\inetpub\wwwroot\*\login.aspx' | ForEach {

  (Get-Content $_.FullName) | ForEach {

    $_ -replace "<title>Welcome to Synergy!</title>","<title>Welcome!</title>"

  } | Set-Content $_.FullName

}

它对 wwwroot 的子目录没有任何作用?

【问题讨论】:

    标签: loops powershell replace iteration


    【解决方案1】:

    我回答了我自己的问题。我没有输入 Get-Childitem 参数的完整路径

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多