It will read the exif information of images or videos and update the creation and modification date/time of those file.
- To run the script goto images_videos.mjs and change the
camDir
to any path which contains images and videos. - This will only work for images and videos
on macos run:
cd /to/some/path
git clone https://github.com/ganeshrvel/openmtp-update-files-to-system-time
npm install -g zx
brew update
brew install exiftool
export these variables this before running the script
export LC_CTYPE=en_US.UTF-8 && export LC_ALL=en_US.UTF-8
zx ./images_videos.mjs