技术栈

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

喵个咪2024-09-22 14:23
powershell 复制代码
Get-ChildItem -Path "." -Recurse -Include "*.js" | ForEach-Object -Begin { $Counter = 1 } -Process { 
    $newName = $_.BaseName + ".ts"
    Rename-Item $_.FullName -NewName $newName
    $Counter++ 
}
上一篇:Spring Boot 入门:解锁 Spring 全家桶
下一篇:IOS 25 实现歌单详情(UITableView)列表 ②
相关推荐
tianyuanwo
2 天前
Shell 脚本中的“字典”功能:从基础到工程化的最佳实践
shell·字典
爱睡觉111
2 天前
在 Android 模拟器 Shell 下运行 ncnn 推理的性能排查记录
linux·shell
Bolt
3 天前
Kimi code 用不了 Figma?看这里解决
shell·mcp
星光不问赶路人
5 天前
Shell 脚本避坑指南:从模式匹配到错误处理的实用技巧
shell
pr_note
6 天前
balance_points
shell·tcl
pr_note
6 天前
icc2/fc屏蔽指定warning
shell·tcl
诸神缄默不语
13 天前
Linux shell脚本教程
linux·bash·shell·sh
liyoro
16 天前
用 Codex + 提示词生成一个快速打开 Ghostty 的 macOS 小工具
macos·shell·ai编程
pr_note
17 天前
bashrc/alias
shell·tcl
怒放吧德德
18 天前
JDK 版本一键切换工具(windows)
后端·shell
热门推荐
01GitHub 镜像站点02【AI】2026 年具身智能模型和世界模型总结03Codex 下载安装指南:Windows 和 macOS 官方版下载042026 年 AI 编程工具终极横评:Cursor vs Claude Code vs Copilot vs Windsurf052026 AI 编程工具终极实战指南:Cursor vs Claude Code vs Copilot,开发者该怎么选?06【踩坑记录 | 第一篇】微软商店无法使用时,如何手动安装 OpenAI Codex?附`.msix`文件系统错误解决方法07CC-Switch 下载、安装与使用配置指南【2026.5.29】08Agnes AI 全模态 API 免费实测报告:文生图 + 文生视频完整测试09CC-Switch & Claude 基于 Linux 服务器安装使用指南10AI科技热点日报 | 2026年6月1日