An open API service indexing awesome lists of open source software.

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 😁

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)