A series of bash file utilities for users who want to organize simple files (such as photos) without buying a subscription to a premium file utility app.
Operates within the current working directory. Run: sh <scriptname.sh>
- Renames undesirable image extensions (
.jpg,.jpeg,.bmp,.heic,.webp) to.png. - Changes
.m4ato.mp3. - Changes
.movto.mp4.
- Rename a file to its
CreatedDate. - Ex: iOS
IMG_0000filename pattern for photos becomesyyyyMMdd_NNNN. - The extension of the original file is preserved.
- Naming the file by its date of creation ensures that, if date data is written over (ex: during file transfer across operating systems or upload platforms), the numerical name of the file guarantees its ability to be sorted by date.
- The reverse of the
RenameFileNameByCreatedDate.shscript above. - If a file is already named according to a
yyyyMMdddate pattern, this script will set a file'sCreateDateandModifiedDateto reflect the filename. Includes hours-minutes.
- Requires imagemagick.org commandline tool for
mogrifycommand. - Requires files to be named according to
yyyyMMddpattern. - Preserves the original filename.
- Strips EXIF data (which is a useful for photos).
- Resets the
ModifiedDateto be the same month-day-year date as theCreatedDate. Resets hours-minutes-seconds to00:00:00.- The use case for this is to avoid the unfortunate tendency of some file organization programs, such as Apple's Photos app, to prefer arranging files according to their
ModifiedDateregardless of theCreatedDate.
- The use case for this is to avoid the unfortunate tendency of some file organization programs, such as Apple's Photos app, to prefer arranging files according to their