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

powershell 复制代码
Get-ChildItem -Path "." -Recurse -Include "*.js" | ForEach-Object -Begin { $Counter = 1 } -Process { 
    $newName = $_.BaseName + ".ts"
    Rename-Item $_.FullName -NewName $newName
    $Counter++ 
}
相关推荐
k4m7v2pz1 天前
34 天 33 个版本:rvs(rust-verb-shell)如何用版本号对抗 AI 误判
rust·shell·命令行工具·ai agent·系统信息·跨平台开发
笨笨狗吞噬者1 天前
IRIS: shell 中的智能实时输入提示工具
github·shell
Lyra_Infra4 天前
Java 应用启动脚本 JDK 路径适配优化文档
java·shell
寒水馨6 天前
macOS下载、安装PowerShell-v7.6.4(附安装包powershell-7.6.4-osx-arm64.pkg)
macos·自动化·跨平台·shell·脚本·命令行·powershell
爱码少年7 天前
一条Shell命令实现文件目录服务器间快速转移
服务器·shell
重生的黑客9 天前
Linux 进程程序替换与自定义 Shell:从 exec 函数族到命令行解释器
linux·运维·服务器·shell
逻极12 天前
Shell脚本实战:从“能跑”到“高效”的3个关键跃升
linux·服务器·shell·脚本
k4m7v2pz13 天前
rvs(rust-verb-shell)v26.7.12 更新:借鉴 ripgrep、自身可观测、修了 mkdir
rust·shell
k4m7v2pz14 天前
rvs(rust-verb-shell):一款面向人类和 AI Agent 的结构化 Shell
rust·shell·基建·rust-verb-shell·verb-noun
小肝一下15 天前
7. 库制作与原理
linux·c语言·操作系统·bash·shell·动静态库