the photo-video-sorter is a small cli tool to sort photos or videos by exif date or ctime as fallback into a folder structure.
e.g. a file with date 2021-12-24 will be moved into this folder structure by default strategy monthYear
{destinationFolder}/2021/12/
to keep the ctime and mtime original
pvs using exiftool to extract exif date from files
so we need the exiftool package for your system
on macOS
sudo brew update
sudo brew install exiftool
https://exiftool.org/install.html
Global
npm install -g photo-video-sorter
Local
npm install photo-video-sorter
Options:
-s, --strategy <monthYear|dayMonthYear|year> the strategy for sorting files into folder (default: "monthYear")
-sf, --sourceFolder <path> the sourceFolder to scan for files
-df, --destinationFolder <path> the destination folder for the sorted files
-t, --fileType <image | video> the file type looking for (default: "image")
-h, --help display help for command
pvs -s dayMonthYear -sf /Users/..../Photos -df /Volumes/Photos -t image
pvs -s dayMonthYear -sf /Users/..../Videos -df /Volumes/Videos -t video
npx pvs -s dayMonthYear -sf /Users/..../Photos -df /Volumes/Photos -t image
npx pvs -s dayMonthYear -sf /Users/..../Videos -df /Volumes/Videos -t video
npm install
npm run serve
npm run build