私はスペースをアンダースコアに置き換え、また、PowerShellを使用して、それらからconstant_を削除することができますどのようにこの形式大量のファイルの名前変更 - PowerShellの
constant_blah_blah_blah.png
とフォルダ内の多くのファイルがありますか?
ありがとうございます。
私はスペースをアンダースコアに置き換え、また、PowerShellを使用して、それらからconstant_を削除することができますどのようにこの形式大量のファイルの名前変更 - PowerShellの
constant_blah_blah_blah.png
とフォルダ内の多くのファイルがありますか?
ありがとうございます。
あなたはこの
Get-childItem constant* | % {rename-item $_.name ($_.name -replace '_',' ')}
Get-childItem constant* | % {rename-item $_.name ($_.name -replace 'constant ','')}
これは2つの名前を変更しますが、必要ではありません(私の答えを見てください)。 – Joey
# gather all files that match the criteria
Get-ChildItem constant_* |
ForEach-Object {
# remove the "constant_" from the beginning and replace _ by space.
Rename-Item $_ ($_.Name -replace '^constant_' -replace '_', ' ')
}
か短いを試すことができます。
ls constant_* | %{rni $_ ($_.Name -replace '^constant_' -replace '_', ' ')}
+1とフィルタリングと展開のls /%。 –
申し訳ありませんが、私は何をしようとしていません。私はPowerShellのしくみを知らない。 – Tsarl
ここ、Google、および/またはMSDNのPowerShellのドキュメントを参照して検索してください。 –