Categories We Write About

Batch-rename downloaded video lectures

To batch-rename downloaded video lectures efficiently, follow these steps based on your operating system:


Windows (Using PowerShell)

  1. Open PowerShell in the folder where your videos are stored.

  2. Use the following script to rename files with a specific pattern:

powershell
$i = 1 Get-ChildItem -Filter *.mp4 | Sort-Object Name | ForEach-Object { $newName = "Lecture_$i.mp4" Rename-Item $_.FullName $newName $i++ }

Modify "Lecture_$i.mp4" to your preferred format, such as "CourseName_Lecture_$i.mp4".


macOS/Linux (Using Terminal/Bash)

  1. Open Terminal in the directory of your files.

  2. Run this command to rename .mp4 files:

bash
a=1 for i in *.mp4; do new=$(printf "Lecture_%02d.mp4" "$a") # 2-digit numbers mv -- "$i" "$new" let a=a+1 done

You can adjust "Lecture_%02d.mp4" as needed.


Using Software (Cross-Platform)

1. Bulk Rename Utility (Windows)

2. Advanced Renamer (Windows)

3. NameChanger (macOS)

4. pyRenamer (Linux)

  • GUI-based tool for GNOME desktop

  • Install via terminal: sudo apt install pyrenamer


Tips for Naming Convention

  • Keep names consistent (e.g., CourseName_Lecture_01.mp4)

  • Use underscores or dashes instead of spaces

  • Consider including date or topic if applicable

Let me know your OS and naming format preferences if you’d like a custom script.

Share This Page:

Enter your email below to join The Palos Publishing Company Email List

We respect your email privacy

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Categories We Write About