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

powershell 复制代码
Get-ChildItem -Path "." -Recurse -Include "*.js" | ForEach-Object -Begin { $Counter = 1 } -Process { 
    $newName = $_.BaseName + ".ts"
    Rename-Item $_.FullName -NewName $newName
    $Counter++ 
}
相关推荐
Kyan.W20 小时前
shell好用的工具
linux·shell
meijinmeng9 天前
Monit-基于非容器服务自恢复程序实践
shell·监控
努力的小帅10 天前
Linux_进程控制(Linux入门到精通)
linux·网络·shell·进程创建·linux入门
saber_andlibert15 天前
【Linux】Shell脚本
运维·chrome·vscode·编辑器·vim·shell
岚天start21 天前
解决方案—K8S集群的日志按天并按照命名空间分类定时同步到日志服务器
服务器·docker·kubernetes·shell·日志备份
aitav022 天前
⚡ Linux awk 命令全面详解(包括记录、字段、命令空间)
linux·运维·服务器·bash·shell·awk
VincentHe1 个月前
当 ServerCat 遇上 Shell 环境变量:一次服务器监控性能优化记录与探索
服务器·shell·监控
虚伪的空想家1 个月前
ip网段扫描机器shell脚本
android·linux·网络协议·tcp/ip·shell·脚本·network
谅望者1 个月前
Linux文件查看命令完全指南:cat、less、head、tail、grep使用详解
linux·excel·less·shell·文件操作·命令行·系统运维
hello_2501 个月前
Shell脚本高效编写技巧
运维·shell