https://github.com/yycoder/rename-files
Rename batch of files using JXA π
https://github.com/yycoder/rename-files
applescript file-utility jxa typescript
Last synced: 6 months ago
JSON representation
Rename batch of files using JXA π
- Host: GitHub
- URL: https://github.com/yycoder/rename-files
- Owner: YYCoder
- Created: 2020-01-07T08:34:32.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-20T07:29:20.000Z (about 3 years ago)
- Last Synced: 2025-05-02T08:46:31.803Z (10 months ago)
- Topics: applescript, file-utility, jxa, typescript
- Language: TypeScript
- Homepage:
- Size: 15.6 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[English](./docs/en.md) | [δΈζ](./docs/cn.md)
# rename-files
Rename batch of files interactively using JXA π~
> Inspired by dtinth's [Batch File Rename](https://gist.github.com/dtinth/93e230152a771dcb1ec5).
### Installation
1. `git clone git@github.com:YYCoder/rename-files.git`: clone this repository
1. `cd rename-files`: change directory
1. `npm install`: install dependencies
1. `yarn build`: bundle typescript files to JXA
> `yarn build` will generate a JXA script named `index.scpt` at your current working dictionary.
3. [add it to OS X Service](https://developer.apple.com/library/archive/documentation/LanguagesUtilities/Conceptual/MacAutomationScriptingGuide/MakeaSystem-WideService.html#//apple_ref/doc/uid/TP40016239-CH46-SW1) or you can save it as an app, also just use `osascript` to run it
### Other JXA resources
* [The JXA Cookbook](https://github.com/JXA-Cookbook/JXA-Cookbook/wiki#table-of-contents)
* [Mac Automation Scripting Guide](https://developer.apple.com/library/archive/documentation/LanguagesUtilities/Conceptual/MacAutomationScriptingGuide/index.html#//apple_ref/doc/uid/TP40016239-CH56-SW1)
* [A Beginners Guide to JXA, JavaScript Application Scripting](https://computers.tutsplus.com/tutorials/a-beginners-guide-to-javascript-application-scripting-jxa--cms-27171)
* [Javascript for Automation Documentation](https://developer.apple.com/library/archive/releasenotes/InterapplicationCommunication/RN-JavaScriptForAutomation/Articles/OSX10-11.html#//apple_ref/doc/uid/TP40014508-CH110-SW1)