Renaming photo and video files backed up through onedrive (skydrive)

i'm new to directory opus and one of the many uses I wanted to use it for was to replace some of my other photo/renaming tools.

I back up all my photos to one drive and it names the photos and videos in this format:

i very little about regular expressions or scripting and I was hoping someone could help me with something that seems pretty simple.

the main thing is that one drive seems to treat different video files differently. the photos I think I can figure out using the date taken meta data. but for mp4 files which I get from my digital camara transferred to my iPhone via an eyefi card, and the .mov files the iPhone generates seem to do something funky with the date modified.

i'm looking for a way to get my mp4 files renamed:
2015-07-05 11.37.13.mp4 format

and if its easy to do take that date/time and apply it to the date mod and date created metadata/attributes. one drive captures the date and time correctly in the filename but for some reason sets the modified date back 5 hours. and the creation date is set as of the time when the file was backed up on one drive.

The mov files have the correct mod date, (same for create date as above, set to date/time it was backed up by one drive) and the filename is forward 5 hours. i.e. it has a correct date modified of 4:47pm on 12/23/2015 but the filename says this:
I think I can use the date modified to rename this file to 2015-12-23 16.47.42.MOV

the pictures also have filenames set 5 hours in advance, but I think I can just use the date taken metadata to rename those so those are not a problem. its mainly the video files that don't have a date taken/shot/digitized info stored in the file.

I have a feeling it has to do with time zones. i'm on the east coast. maybe naming the files in gmt?

so ultimately i'm going to have 3 scripts for each type of file
photos-i'll use datetaken to rename the files (and have it set the mod/create date from the date taken.
.mov-i'll use mod date to rename the files (and hopefully have it also set the create date from the modified date)
.mp4-i'm looking for help to get it to just rename the file, and use the filename to set the create/modified date.

once the files are renamed, i'll be looking for a way to folder all the files I've renamed into the following folders structure:


my plan is then look through the pictures and manually rename the last folder to YYYY-MM-DD some descriptive text
and then have the "some descriptive text" portion appended to all the files in that folder. I.e

2015\2015-07-July\2015-07-05 some descriptive text\2015-07-05 11.37.13 some descriptive text.mp4

if anyone can help me with some portion of all the above, particularly the mp4 portion that would be really great.


[quote]i'm looking for a way to get my mp4 files renamed:
2015-07-05 11.37.13.mp4 format[/quote]

That part can be done using the Rename (Advanced) dialog in Regular Expressions mode.

Old name: (20\d\d)(\d\d)(\d\d)_(\d\d)(\d\d)(\d\d)\d*_iOS(\.[^.]*) New name: \1-\2-\3 \4.\5.\6\7

For setting the modified timestamp based on the date/time in the filename, file name to modified date/time? has a script which does that. It will need a slight change for the different date format.

The line with:

re.Pattern = "^(\d\d\d\d-\d\d-\d\d)_(\d\d)(\d\d)(\d\d)(\.[^.]+)$"

Needs the _ changing to a space and the .'s adding between the time part:

re.Pattern = "^(\d\d\d\d-\d\d-\d\d) (\d\d)\.(\d\d)\.(\d\d)(\.[^.]+)$"

It would then work with filenames like 2015-07-05 11.37.13.mp4 (slight changes would be needed for other formats).