Windows使用PowerShell批量修改文件后缀

powershell 复制代码
Get-ChildItem -Path "." -Recurse -Include "*.js" | ForEach-Object -Begin { $Counter = 1 } -Process { 
    $newName = $_.BaseName + ".ts"
    Rename-Item $_.FullName -NewName $newName
    $Counter++ 
}
相关推荐
AlbertS2 天前
Shell脚本中set -e和set -o pipefail的作用
shell·pipefail·trap·脚本错误·控制流程
阿海5743 天前
安装php7.4.33的shell脚本
php·shell
阿海5743 天前
卸载redis7.2.4的shell脚本
linux·redis·shell
小嘟嘟134 天前
从基础到进阶:掌握 userdel,玩转 Linux 用户管理的 “减法” 艺术
linux·运维·网络·shell
gis分享者4 天前
如何在 Shell 脚本中实现文件的读写操作?(容易)
shell·文件·awk·echo·cat··
eight *5 天前
源码部署docker自动化脚本
docker·shell
gis分享者6 天前
如何在 Shell 脚本中使用管道(pipeline)实现数据传递?(容易)
linux·pipeline·shell·脚本·管道·数据传递
シ風箏8 天前
Shell【脚本 06】监测文件数据量并压缩及查看远程服务器状态并删除文件脚本分享
linux·运维·服务器·github·shell
pingzhuyan9 天前
linux运维异常(总) - 排查与修复(系统yum,docker,网络dns解析等)
linux·运维·docker·centos·shell
问道飞鱼9 天前
【Linux知识】Shell 脚本参数详解:从基础到高级应用
linux·运维·服务器·shell