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.
Place the desired .sh file in the same folder as the files you wish to change, then execute in terminal: sh <filename.sh>
- Converts undesirable image extensions (
.jpg,.jpeg,.bmp,.heic,.webp) to.png. - Converts
.m4ato.mp3. - Converts
.movto.mp4. - This simple script can be altered to include any file extension conversion that you wish!
- Rename a file to its
CreatedDate. - Ex: iOS
IMG_0000filename pattern for photos becomesyyyyMMdd_NNNN. - The extension of the original file is preserved.
- 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