Skip to content

Rename Files ​

Location on ribbon: Tab DVD Addin → Group File and Print → Menu File Tools

Command ID: btnRenameFiles

What it does ​

The command batch-renames files in a folder using a two-column mapping table you build on the sheet: left column is the old name, right column is the new name. Excel becomes the place where you compose and verify the new names with formulas before they touch the disk.

It is exactly what you need when tidying a submission: turning hundreds of camera file names (IMG_2841.JPG) into meaningful work-item codes, or renaming drawings to the client's numbering convention before handover.

How to use ​

  1. On the sheet, build a two-column table: the left column holds the old file name, the right column the new file name. (Use File List to grab the old-name column quickly.) Including the extension is recommended; see the Notes if you leave it out. Keep the column just right of the table empty — the command writes a status for each row there.
  2. Go to tab DVD Addin → group File and Print → File Tools → Rename Files.
  3. A range picker appears explaining "LEFT column = old name, RIGHT column = new name" — drag over the table body (skip the header row) and press OK.
  4. The Pick folder containing files dialog opens — choose the folder holding the files and press OK.
  5. The command plans the whole table before touching the disk: it finds the file matching each row's old name and checks the new name, then the Confirm data change window shows how many files will be renamed, a few examples and the problem rows (no backup is possible) — click Continue. It then renames in two phases through temporary names, so swapping A ↔ B or chaining A → B, B → C works in a single run.
  6. Each row of the table gets a status in the column just right of the selected range: Renamed, File not found, Target name taken, Invalid new name, Already named so, or Error: … (with the reason).
  7. The final message reports how many files were renamed, groups the problem rows by reason with their file names, and shows the path of the run's CSV log.

Video tutorial ​

Narrated in Vietnamese, with Vietnamese subtitles. Đổi tên file, Tạo folder, Bỏ dấu folder · 5 min 47 s · 15 cases · Download the video · Practice workbook for the video

Commands in this video: Rename Files · Create Folder · UnDiacritics Folder

Chapters (23)
  1. Giới thiệu
  2. Mở lệnh
  3. Hai hộp hỏi
  4. 1 · Đổi tên ảnh nghiệm thu
  5. 2 · Không ghi đuôi file
  6. 3 · Tên mới có dấu chấm
  7. 4 · Bảng có dòng lỗi
  8. 5 · Đổi chéo hai tên
  9. 6 · File đang mở
  10. 7 · Đổi ngược lại
  11. Lệnh Tạo Folder
  12. 8 · Khung thư mục dự án
  13. 9 · Nhân bản cây thư mục cũ
  14. 10 · Chạy lại, thêm thư mục
  15. 11 · Ký tự cấm, gạch ngược
  16. 12 · Sheet trống – bảng mẫu
  17. Lệnh Bỏ dấu Folder
  18. 13 · Bỏ dấu cả cây hồ sơ
  19. 14 · Mục bị bỏ qua
  20. 15 · Khi chọn sai
  21. Hoàn tác
  22. Mẹo
  23. Kết thúc

Illustrated walkthrough ​

Practice

Download this command's sample workbook — the data matches the pictures below (sheet Photo rename), so you can follow each step right away.

Step 1. Build a two-column table: the left column holds the old file name, the right column the new file name (preferably with the extension). Leave the column right of the table empty — the command writes each row's status there. The range to pick is the data only, without the header row (1).

Step 1

Step 2. On the ribbon, open the DVD Addin tab → File and Print group → open File Tools → choose Rename Files.

DVD Addin ▸ File and Print ▸ File Tools ▸ Rename Files

Step 3. The range box shows the hint LEFT column = old name, RIGHT column = new name — select B3:C7 and click OK. Then, in the Pick folder containing files box, choose the photo folder (for example D:\DuAn\NhaVanPhong\AnhNghiemThu) and click OK.

Step 4. The add-in plans the whole table before touching the disk: the number of files to rename (1), followed by the folder, a few examples and the problem rows — here IMG_2845.JPG is not in the folder. Renaming is a real change on disk that cannot be backed up; click Continue (2).

Step 4

Step 5. Four files are renamed; every row of the table gets a status in the column to its right (1). The final message reads Renamed 4/4 files., groups the problem rows by reason and gives the path of the CSV log (in %LocalAppData%\DVDAddin\Logs).

Step 5

Example ​

The folder D:\Records\Inspection_Photos holds camera images that need inspection-record codes. You build this table in B3:C6:

Old name (column B)New name (column C)
IMG_2841.JPGINS-501_beam_gridA.jpg
IMG_2842.JPGINS-501_beam_gridB.jpg
IMG_2843.JPGINS-502_slab_S1.jpg
IMG_2844.JPGINS-502_slab_S2.jpg

Select B3:C6, point at the photo folder, and the four files on disk are renamed to match; column D reads Renamed on all four rows. Run Comment by Name afterwards and the register instantly has hover-preview photos.

Notes ​

  • Extensions: a new name without a real extension keeps the old file's extension — for an old PDF file, BB-01 becomes BB-01.pdf; BV 1.2 becomes BV 1.2.pdf because .2 is not a file extension. The old-name column may leave out the extension when exactly one file in the folder has that name; if several files share the name with different extensions, write the extension in full.
  • The command renames real files on disk — Ctrl+Z will not undo it and there is no revert button. Back up the folder before running it on important records.
  • Every run saves a CSV log (folder, old name, new name, status) in %LocalAppData%\DVDAddin\Logs, named DoiTenTep_<date>_<time>.csv; its path is shown in the final message so you can look it up later.
  • If the new name matches another file that stays in the folder, that row reads Target name taken and is skipped — no file is ever overwritten. Swaps and chains between files in the same table do not count as clashes.
  • A row whose new name equals the old name reads Already named so; a new name containing characters Windows does not allow in file names reads Invalid new name; a blank new-name cell is skipped.
  • Statuses are written only when the column just right of the table is empty or holds statuses from a previous run; if it contains other data, it is left untouched.
  • The last column of the selected range is used as the new name; if you drag over three columns the middle one is ignored, so select exactly two.
  • Matching is case-insensitive and ignores Unicode normalisation differences: names coming from a Mac or extracted from a zip file still match names typed with Unikey. Only files sitting directly in the folder are processed — subfolders are not touched.
  • Press ESC to stop mid-run. Any file already moved to a temporary name is always either finished or put back under its old name — never left stranded.
  • The range picker does not lock Excel: while it is open you can scroll, switch sheets or switch workbooks to pick the range there. Click OK or press Enter on the sheet when done; Cancel or Esc to stop.
  • File List — export the existing file names into the sheet to build the "old name" column.
  • Strip Accents in Folder — remove Vietnamese diacritics from file and folder names.
  • Create Folders — build the document folder tree from a list on the sheet.
  • File Tree — re-check the whole folder after the rename.

Released under DVDAddin License.