analytics-renamer
v1.0.5
Published
File Renamer is a Python script that renames all files in a specified folder by converting names to lowercase, removing Vietnamese accents, eliminating punctuation, and replacing spaces with hyphens.
Maintainers
Readme
File Renamer
File Renamer is a Python script that renames all files in a specified folder by converting names to lowercase, removing Vietnamese accents, eliminating punctuation, and replacing spaces with hyphens. It provides a simple command-line interface for batch file renaming.
Installation Guide
To use the tool, you need Python 3.x and the unidecode library. Install the required dependency using pip:
npm install unidecodeNo additional dependencies are required beyond a Python environment.
Purpose
– Rename all files in a folder to a standardized format.
– Convert file names to lowercase.
– Remove Vietnamese accents (e.g., Hà Nội becomes Ha Noi).
– Remove punctuation (e.g., file,name!.txt becomes filename.txt).
– Replace spaces with hyphens (e.g., my file.txt becomes my-file.txt).
Workflow
Run the script: Execute the script in your terminal or command prompt.
Enter folder path: Input the path to the folder containing files to rename. Enter 0 to exit.
Automatic renaming: The script processes all files in the specified folder, applying the renaming rules.
Review results: The script displays the old and new names of each file and a summary of processed files.
Example usage in terminal:
python rename_files.pySample interaction:
Vui lòng nhập đường dẫn thư mục (0 để thoát): D:\MyFolder
Đang xử lý…
Đã đổi tên: My File!.txt → my-file.txt
Đã đổi tên: Hà Nội_Document.pdf → ha-noi-document.pdf
Đã xử lý 2/2 tệp.Contact & Support
Email: [email protected].
Website: nhavan.vn.
If you have any questions or suggestions, feel free to reach out for the fastest support.
Don’t forget to star this repository if you find it useful.
Công cụ đổi tên tệp
Công cụ đổi tên tệp là một tập lệnh Python giúp đổi tên tất cả các tệp trong một thư mục được chỉ định bằng cách chuyển tên sang chữ thường, xóa dấu tiếng Việt, loại bỏ dấu câu và thay khoảng trắng bằng dấu gạch ngang. Công cụ cung cấp giao diện dòng lệnh đơn giản để đổi tên hàng loạt.
Hướng dẫn cài đặt
Để sử dụng công cụ, bạn cần Python 3.x và thư viện unidecode. Cài đặt thư viện cần thiết bằng npm:
npm install unidecodeKhông yêu cầu thêm thư viện phụ thuộc ngoài môi trường Python.
Công dụng
– Đổi tên tất cả tệp trong thư mục sang định dạng chuẩn hóa.
– Chuyển tên tệp sang chữ thường.
– Xóa dấu tiếng Việt (ví dụ: Hà Nội thành Ha Noi).
– Loại bỏ dấu câu (ví dụ: tệp,này!.txt thành tep-nay.txt).
– Thay khoảng trắng bằng dấu gạch ngang (ví dụ: tệp của tôi.txt thành tep-cua-toi.txt).
Flow thao tác
Chạy tập lệnh: Thực thi tập lệnh trong terminal hoặc command prompt.
Nhập đường dẫn thư mục: Nhập đường dẫn đến thư mục chứa các tệp cần đổi tên. Nhập 0 để thoát.
Đổi tên tự động: Tập lệnh xử lý tất cả tệp trong thư mục, áp dụng các quy tắc đổi tên.
Xem kết quả: Tập lệnh hiển thị tên cũ và mới của mỗi tệp cùng tóm tắt số lượng tệp đã xử lý.
Ví dụ sử dụng trong terminal:
python rename_files.pyVí dụ tương tác:
Vui lòng nhập đường dẫn thư mục (0 để thoát): D:\MyFolder
Đang xử lý…
Đã đổi tên: My File!.txt → my-file.txt
Đã đổi tên: Hà Nội_Document.pdf → ha-noi-document.pdf
Đã xử lý 2/2 tệp.Liên hệ & Hỗ trợ
Email: [email protected].
Website: nhavan.vn.
Nếu bạn có câu hỏi hoặc đề xuất, đừng ngần ngại liên hệ để được hỗ trợ nhanh nhất.
Đừng quên star repository này nếu bạn thấy nó hữu ích.
