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

powershell 复制代码
Get-ChildItem -Path "." -Recurse -Include "*.js" | ForEach-Object -Begin { $Counter = 1 } -Process { 
    $newName = $_.BaseName + ".ts"
    Rename-Item $_.FullName -NewName $newName
    $Counter++ 
}
相关推荐
gis分享者1 天前
Shell 脚本中如何使用 here document 实现多行文本输入? (中等)
shell·脚本·document·多行·文本输入·here
柏木乃一1 天前
基础IO(上)
linux·服务器·c语言·c++·shell
angushine2 天前
CPU脚本并远程部署
shell
赵民勇7 天前
Linux/Unix中install命令全面用法解析
linux·shell
gis分享者7 天前
Shell 脚本中如何使用 trap 命令捕捉和处理信号(中等)
shell·脚本·信号·处理·trap·捕捉
IT 乔峰8 天前
脚本部署MHA集群
linux·shell
牛奶咖啡1310 天前
shell脚本编程(一)
linux·shell·shell脚本·shell脚本解析·grep命令语法·grep选项详解·正则表达式解析
gis分享者12 天前
请解释 Shell 脚本中的重定向(redirection)操作及其用途(中等)
shell·脚本·重定向·操作·用途·redirection
我是koten12 天前
K8s启动pod失败,日志报非法的Jar包排查思路(Invalid or corrupt jarfile /app/xxxx,jar)
java·docker·容器·kubernetes·bash·jar·shell
Huazzi.14 天前
PowerShell 配置以及使用指南
windows·git·编辑器·shell·powershell·效率