批量重命名

一个用于实现文件批量重命名的CLI工具。

安装

  1. 克隆仓库并将bin/batch_rename.exe添加到PATH

    gh repo clone POWRFULCOW89/batch_rename

    或者

  2. 获取pub包

    dart pub add batch_rename

    并从源代码构建

    dart compile exe .\bin\batch_rename.dart

    或者

  3. 获取预编译的二进制文件

用法

batch-rename.exe substring [new_string] [-h] [-n] [-r]

positional arguments:
   substring   Substring to strip or replace out of every file in path.
   new_string  String to replace for every matching substring. Defaults to an empty string.

optional arguments:
   -h, --help  show this help message and exit.
   -n          Rename all files to substring and number them accordingly.
   -r          Batch rename recursively in subdirectories.

示例

  1. favicon.png生成一套标准图标

    batch_rename favicon.png 
  2. logo.jpg生成标准、Apple和Windows 10图标集

    batch_rename logo.jpg -a -w
  3. 删除所有括号及其内容

    batch_rename "\[.+\]" 

GitHub

查看 Github