{"id":13941562,"url":"https://github.com/JasonGrass/rename","last_synced_at":"2025-07-20T04:31:54.204Z","repository":{"id":212041977,"uuid":"728660300","full_name":"JasonGrass/rename","owner":"JasonGrass","description":"在线文件批量重命名","archived":false,"fork":false,"pushed_at":"2024-09-22T03:42:50.000Z","size":1142,"stargazers_count":456,"open_issues_count":3,"forks_count":46,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-11-27T10:36:11.616Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://rename.jgrass.xyz/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JasonGrass.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-07T12:21:39.000Z","updated_at":"2024-11-24T17:37:18.000Z","dependencies_parsed_at":"2024-01-23T10:00:49.989Z","dependency_job_id":"e85a2ce2-a5df-4ffc-8987-47adf242223e","html_url":"https://github.com/JasonGrass/rename","commit_stats":null,"previous_names":["jasongrass/rename"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/JasonGrass/rename","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JasonGrass%2Frename","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JasonGrass%2Frename/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JasonGrass%2Frename/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JasonGrass%2Frename/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JasonGrass","download_url":"https://codeload.github.com/JasonGrass/rename/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JasonGrass%2Frename/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266067262,"owners_count":23871324,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-08T02:01:21.339Z","updated_at":"2025-07-20T04:31:50.047Z","avatar_url":"https://github.com/JasonGrass.png","language":"TypeScript","funding_links":[],"categories":["TypeScript","工具"],"sub_categories":["在线工具"],"readme":"# Rename - 在线文件批量重命名工具\n\n\u003cimg src=\"./src/assets/icon256.ico\" width=\"64\" alt=\"icon\"/\u003e\n\n## 🍉 批量重命名工具\n\n\u003chttps://rename.jgrass.xyz/\u003e  \n\n提供常用的文件批量重命名操作，无需下载安装，即用即走。\n\n## 🍉 实现原理与隐私问题\n\n使用的是浏览器加载文件的相关 API，读取本地文件名称信息（不读取文件内容），同样使用浏览器提供的 API 来修改文件名称。\n\n所有数据只保留在本地浏览器内存中，关闭页面时清空，不会上传服务器（这个工具不需要也没有服务器）。\n\n并且每一次使用，都需要你的手动允许和授权（导入文件或文件夹时）。具体用到的浏览器 API 如下：\n\n[Window：showOpenFilePicker() 方法 - Web API 接口参考 | MDN](https://developer.mozilla.org/zh-CN/docs/Web/API/Window/showOpenFilePicker )  \n[Window：showDirectoryPicker() 方法 - Web API 接口参考 | MDN](https://developer.mozilla.org/zh-CN/docs/Web/API/Window/showDirectoryPicker )  \n[FileSystemFileHandle - Web API 接口参考 | MDN](https://developer.mozilla.org/zh-CN/docs/Web/API/FileSystemFileHandle )\n\n## 🍉 缘起\n\n批量重命名是一个低频但时不时又会遇到的需求，为此专门下载一个软件过于大费周章。都 3202 年了，应该可以用 web 来做了吧。果然发现了相关的 API，于是有了这个在线工具。\n\n## 🍉 浏览器兼容 \u0026 已知问题\n\n因为使用了实验性的 API，浏览器兼容会有问题。如果发现功能有问题，请使用最新版 Edge/Chrome 浏览器。\n\n[\"showOpenFilePicker\" | Can I use...](https://caniuse.com/?search=showOpenFilePicker )\n\n核心 API：[FileSystemFileHandle.move() for local files - Chrome Platform Status](https://chromestatus.com/feature/6271579653144576 )\n\n**已知问题**：`FileSystemFileHandle.move` 方法对文件进行重命名时，会更改文件的“修改时间”，而手动重命名或使用本地重命名工具，不会有这个问题。\n\n## 🍉 高级技巧\n\n提供的预设规则，无法满足一些个性化的需求，可以使用正则表达式替换完成一些高级功能。  \n或者直接编写 js 代码。🤣\n\n正则替换底层实现：`String.replace(pattern, replacement)` [String.prototype.replace() - JavaScript | MDN](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/String/replace )\n\n可以参考这里的案例：[#2](https://github.com/JasonGrass/rename/discussions/2)，或者直接使用本地运行的重命名工具，这里有一些网友的推荐：[#3](https://github.com/JasonGrass/rename/discussions/3)\n\n---\n\n部分 UI 设计参考了 utools 中的批量重命名插件。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJasonGrass%2Frename","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJasonGrass%2Frename","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJasonGrass%2Frename/lists"}