Skip to content

Simple shell script to rename files or directories by month.

Notifications You must be signed in to change notification settings

seagleNet/rename_by_month

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Rename By Month

Simple shell script to rename files or directories by month.

The script checks items in one given location for a simple pattern (3-letter month abbreviation) to match the month and renames the items with the month's number as a prefix.

Usage

./rename_by_month.sh /path/to/dir

Example

Before:

$ ls -1
April.zip
August.zip
December.zip
February.zip
January.zip
July.zip
June.zip
March.zip
May.zip
November.zip
October.zip
September.zip

After:

$ ls -1
01_January.zip
02_February.zip
03_March.zip
04_April.zip
05_May.zip
06_June.zip
07_July.zip
08_August.zip
09_September.zip
10_October.zip
11_November.zip
12_December.zip

About

Simple shell script to rename files or directories by month.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages