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

powershell 复制代码
Get-ChildItem -Path "." -Recurse -Include "*.js" | ForEach-Object -Begin { $Counter = 1 } -Process { 
    $newName = $_.BaseName + ".ts"
    Rename-Item $_.FullName -NewName $newName
    $Counter++ 
}
相关推荐
xbzb1 天前
Shell 函数:语法、传参与递归调用一次讲透
shell·递归·函数·调用·传参·递归调用
东鹏特饮2 天前
15个实用Linux运维脚本
linux·运维·shell·脚本·redhat·常用生产脚本
Zoom3 天前
【开源】7 天,我用 Rust 复刻了 FinalShell!Rhost v1.0.0 发布
rust·electron·shell
Lsetea11 天前
OpenSSL s_client退出码为0却证书验证失败:严格校验与Shell管道排查
https·shell·ssl证书·openssl·tls
fox_charon13 天前
Windows 下 CLI 参数的引号陷阱:为什么 --resume 'uuid' 会失败
windows·shell·cmd·cli·引号
吴声子夜歌22 天前
Shell编程实例——编写安全的shell脚本(二)
linux·运维·shell
吴声子夜歌23 天前
Shell编程实例——内务及管理任务(一)
linux·运维·shell
吴声子夜歌23 天前
Shell编程实例——高级脚本编程(一)
linux·运维·网络·shell
吴声子夜歌23 天前
Shell编程实例——bash的配置与自定义(二)
linux·运维·shell
吴声子夜歌24 天前
Shell编程实例——与解析相关的任务(二)
linux·运维·shell