How to change "date modified" of multiple folders to be the same of that of the .mkv that's inside each one.
eg. there's folder1 which contains a file 1.mkv
folder1: 2/17/14
1.mkv: 1/6/12
I want folder1 to get "date modified" 1/6/12
there's also
folder2: 20/9/13
2.mkv: 1/1/10
I want folder2 to get "date modified" 1/1/10
etc
Maybe some modification of this touch command from https://unix.stackexchange.com/a/1526 would help?
touch -r **/*(Dom[1]) .
(I can't understand what it does)
Here are some sample paths (using Cygwin of course):
Kostas@Kostas-pc /cygdrive/f/movies
$ ls -l
drwx------+ 1 Kostas None 0 Feb 18 17:03 Serpico (1973)
drwx------+ 1 Kostas None 0 Feb 21 01:13 The Rite (2011)
eg
Kostas@Kostas-pc /cygdrive/f/movies
$ ls -l The\ Rite\ \(2011\)/
total 5730596
-rwx------+ 1 Kostas ???????? 5867505504 Apr 27 2011 The Rite (2011).mkv
-rwx------+ 1 Kostas ???????? 12968 Feb 16 20:03 The Rite (2011).nfo
-rwx------+ 1 Kostas ???????? 79757 Apr 26 2011 The Rite (2011).srt
-rwx------+ 1 Kostas ???????? 264745 Oct 8 2011 The Rite (2011).tbn
-rwx------+ 1 Kostas ???????? 255667 Oct 8 2011 The Rite (2011)-fanart.jpg