Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Powershell batch renaming

2025-04-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

First create a few files for testing: $Directory = "C:\ Test" For ($item0 / le 10; + $I) {Set-Content-Path $("$Directory\ Test ($I) .txt")-value $I}

The creation result is as shown below:

Use the following command to replace Test with MailPS D:\ > $Directory = "C:\ Test" PS D:\ > Get-ChildItem $Directory | Rename-Item-NewName {$_ .name- Replace "Test", "Mail"}

The result is as follows:

Learning links:

Http://www.computerperformance.co.uk/powershell/powershell_replace.htm

Http://www.pstips.net/bulk-renaming-files.html

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report