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

powershell 复制代码
Get-ChildItem -Path "." -Recurse -Include "*.js" | ForEach-Object -Begin { $Counter = 1 } -Process { 
    $newName = $_.BaseName + ".ts"
    Rename-Item $_.FullName -NewName $newName
    $Counter++ 
}
相关推荐
leaf9z3 小时前
阿里云ECS在线扩容磁盘
阿里云·云计算·shell
gfdgd xi2 天前
deepin 终端,但是版本是 deepin 15 的
linux·python·架构·ssh·bash·shell·deepin
大米粥哥哥6 天前
Qt QProcess基于Linux的命令管道符号无效问题【已解决】
linux·qt·shell·qprocess·1024程序员节·管道符号
缘友一世12 天前
深入理解Shell与反弹Shell:从原理到实战
linux·网络安全·shell
hour_go14 天前
Linux Shell 实验一:数据采集与脚本调试错误总结
linux·笔记·bash·shell·实验报告·错误排查
struggle202515 天前
AxonHub 开源程序是一个现代 AI 网关系统,提供统一的 OpenAI、Anthropic 和 AI SDK 兼容 API
css·人工智能·typescript·go·shell·powershell
shark16 天前
无需放弃变更、关闭占用程序!用暂存区和 git底层命令实现 Git 变更备份
git·shell·自动化运维
vortex517 天前
Shell脚本技巧:去除文件中字符串两端空白
linux·bash·shell·sed·awk
九皇叔叔18 天前
Linux Shell 函数:从定义到实战,让脚本更高效
linux·运维·chrome·shell
刘某的Cloud18 天前
SSH命令建立隧道
linux·运维·ssh·系统·shell