1 Star 2 Fork 2

刘彬彬/小知识_自动化任务脚本_DhanushNehru

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

File Renamer Script

Description

The FileRenamer.py script is a utility designed to rename multiple files in a specified directory based on a given regex pattern. This script helps users quickly standardize file names, making file management easier.

Features

  • Batch Renaming: Rename multiple files that match a specified regex pattern.
  • Custom Naming: Users can provide a new base name for the renamed files, with a counter appended to ensure unique names.

Usage

  1. Ensure you have Python installed on your machine.
  2. Download the FileRenamer.py script.
  3. Open a terminal or command prompt and navigate to the directory where the script is located.
  4. Run the script using the following command: python FileRenamer.py
  5. When prompted, enter the path of the directory containing the files you want to rename. Enter path: /path/to/your/directory
  6. Enter the regex pattern for the files you want to rename. For example: Enter pattern: IMG.*
  7. Enter the new base name for the renamed files. Enter the new name: NewImageName
  8. The script will rename all matching files in the specified directory according to the new name format.

Requirements

  • Python 3.x
  • Basic understanding of file paths in your operating system.
  • Familiarity with regex patterns for filtering files.

License

This script is open-source and free to use. Feel free to modify and distribute as needed.

Contributing

If you'd like to contribute to this project, please open an issue or submit a pull request with your proposed changes or enhancements.

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/liu_binbin/some_python_scripts.git
git@gitee.com:liu_binbin/some_python_scripts.git
liu_binbin
some_python_scripts
小知识_自动化任务脚本_DhanushNehru
master

搜索帮助