This changes the date of a file to match the image or video name. Sometimes when a picture is moved from a phone to a computer or vice versa, the creation date is changed, causing photos to be displayed in the wrong order. Most phones create phtots in the format IMG_yyymmddhhmmss. This can be useful to determine when the file was actually created. This script scans a folder for files that begin with IMG_ or VID_ and changes the date to match that date.
- Change mypath to the folder containing the photos and videos.
- Change the prefix IMG_ and VID_ to match the naming convention of your files