[ create a new paste ] login | about

Link: http://codepad.org/gmorntt1    [ raw code | fork ]

jleedev - Ruby, pasted on Jul 4:
1
2
3
4
5
6
7
8
#!/usr/bin/env ruby

Dir["*.jpg"].each do |file|
  mm,dd,yy,h,m = [0,3,6,9,11].map { |start| file[start,2] }
  stamp = "20%s-%s-%s %s:%s" % [yy,mm,dd,h,m]
  `exiv2 -k -Y 20#{yy} -O #{mm} -D #{dd} -a#{h}:#{m} ad "#{file}"`
  `touch -d "#{stamp}" "#{file}"`
end


Output:
No errors or program output.


Create a new paste based on this one


Comments: