Powershell 批量重命名
2018-01-25 10:38
225 查看
先创建几个用于测试的文件
$Directory = "C:\Test" For($i=0;$i -le 10; ++$i) { Set-Content -Path $("$Directory\Test($i).txt") -value $i }
创建结果如下图:
使用下面的命令把Test换成Mail
PS D:\> $Directory = "C:\Test" PS D:\> Get-ChildItem $Directory | Rename-Item -NewName { $_.name -Replace "Test","Mail" }
结果如下图:
学习链接:
http://www.computerperformance.co.uk/powershell/powershell_replace.htmhttp://www.pstips.net/bulk-renaming-files.html
相关文章推荐
- PowerShell实现批量重命名文件
- PowerShell实现批量重命名文件
- PowerShell 批量重命名文件
- 如何使用Perl的rename工具进行批量重命名
- 29. PowerShell -- 批量安装msi后缀软件的方法
- PowerShell批量分离SMTP邮箱,并以此创建新用户邮箱
- CMD实战系列之一 - 批量重命名
- python批量重命名乱码文件
- 好软推荐:Ant Renamer-给力的批量重命名软件
- 用python实现批量重命名文件的代码
- Total Commander 批量重命名之位数对齐
- python练习程序(批量重命名)
- 通过PowerShell批量上传FTP文件
- ubuntu下批量修改后缀名及批量重命名
- 批量重命名文件名称
- powershell 2.0的批量部署
- [Azure]使用Powershell批量添加虚拟机ACL
- c++代码批量修改图片名称(重命名)实例及运行结果
- 自己动手实现批量重命名命令
- java 批量重命名文件