How can I bulk rename files using PowerShell?

前端 未结 4 1267
时光取名叫无心
时光取名叫无心 2021-02-20 12:22

I\'m trying to recursively rename a bunch of TFS folders using tf rename, PowerShell and a regular expression but I\'m having some issues with PowerShell as I haven

4条回答
  •  [愿得一人]
    2021-02-20 12:40

    Running the above commands requires the tf.exe to have been aliased as 'tf'.. or it did on my machine at least.

    Run this command:

    Set-Alias tf "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\tf.exe"
    

    Update the path to tf.exe as appropriate

    Also consider adding the line to your profile for future use

    notepad $PROFILE
    

提交回复
热议问题