User Tools

Site Tools


software:datetofile

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Last revisionBoth sides next revision
software:datetofile [2012/05/07 11:48] – [Perl script - date2file] adminsoftware:datetofile [2012/05/07 17:16] – [photo sorting - dateTofile] admin
Line 1: Line 1:
-====== dateTofile ====== +====== photo sorting - dateTofile ====== 
-This page describes a perl- and an Applescript which work together to add the (file creationdate and time to the leading part of a filename. This can be helpful when merging photos from different cameras into one directoryAn offset can be set to adjust for time differences, which can be caused by different time settings between cameras.\\ \\ The applescript works just as front-end to make easy drag and drop possible. The timestamp is actually written with the perl script.\\ \\ For example the following file:+This page describes a solution to help organizing files with different creation dates. Practical for merging different series of photos from cameras with different time settings into one directory. By adding the date and time to the leading part of a filename, files can be sorted chronologicallyAdditionally an offset can be applied to the date and time to correct time differences between cameras. The solution consists of perl script which adds the date and time to the filename, controlled by an applescript to allow easy drag and drop functionality from the desktop.\\ \\ To understand the functionality better, take for example the following file:
   * file name: Img002.jpg   * file name: Img002.jpg
   * Creation date: 23rd of Mai, 2012, 10.07.49 PM   * Creation date: 23rd of Mai, 2012, 10.07.49 PM
  
-Will result in following file names:+After selecting the file, drag and drop it onto the applescript. Depending on the offset, the filename will be modified as follows:
  
-^  Original file  ^  After drag and drop   Offset   Script name  ^  (internal command) +^  Offset  ^  Original file  ^  After drag and drop  ^  Script name  ^  (internal command) 
-| Img002.jpg  | 20120523_220749.Img002.jpg  | No offset  | dateTofile.app  | ./date2file Img002.jpg +^ No offset  | Img002.jpg  | 20120523_220749.Img002.jpg  | dateTofile.app  | ./date2file Img002.jpg 
-| Img002.jpg  | 20120523_230749.Img002.jpg  | Offset +1 hr  | dateTofile+3600.app  | ./date2file -t +3600 Img002.jpg +^ Offset +1 hr  | Img002.jpg  | 20120523_230749.Img002.jpg  | dateTofile+3600.app  | ./date2file -t +3600 Img002.jpg 
-| Img002.jpg  | 20120423_220749.Img002.jpg  | Offset -1 day  | dateTofile-86400.app  | ./date2file -t -86400 Img002.jpg  |+^ Offset -1 day  | Img002.jpg  | 20120423_220749.Img002.jpg  | dateTofile-86400.app  | ./date2file -t -86400 Img002.jpg  |
  
-When using the script directly via the terminal, the script can be invoked with ./date2file [-t offset] file1 file2 ... fileNwhere [ ] is optional.\\ \\ If it is necessary to change the date-time stamp, you can run the script again with the date-time stamped file. Instead of writing an additional date-time stamp, the current one is being replaced instead. This prevents writing double time-stamps like 20120523_230749.20120523_220749.Img002.jpg . For example:+When using the script directly via the terminal, the script can be invoked with the following command: 
 +  ./date2file [-t offset] file1 file2 ... fileN 
 +where [ ] is optional.\\ \\ If it is necessary to change the date-time stamp, the script can be run again with the date-time stamped file. Instead of writing an additional date-time stamp, the current one is being replaced instead. This prevents writing double time-stamps like 20120523_230749.20120523_220749.Img002.jpg . For example:
 ^  Original file  ^  After drag and drop  ^  Offset  ^  Script name  ^  (internal command)  ^ ^  Original file  ^  After drag and drop  ^  Offset  ^  Script name  ^  (internal command)  ^
 | 20120523_220749.Img002.jpg  | 20120523_240749.Img002.jpg  | +2 hr  | dateTofile+7200.app  | ./date2file -t + 7200 20120523_220749.Img002.jpg  | | 20120523_220749.Img002.jpg  | 20120523_240749.Img002.jpg  | +2 hr  | dateTofile+7200.app  | ./date2file -t + 7200 20120523_220749.Img002.jpg  |
Line 17: Line 19:
  
 ====== Download ====== ====== Download ======
-The scripts can be downloaded here: [[http://www.auditeon.com/xyz/dateTofile.app.zip]]. The perl script is stored into the following directory: +The scripts can be downloaded here: [[http://www.auditeon.com/xyz/dateTofile.app.zip]]. The perl script is already stored in the following directory: 
-  Contents/Resources/+  dateTofile.app/Contents/Resources/
  
 ====== Manual installation ====== ====== Manual installation ======
software/datetofile.txt · Last modified: 2013/02/09 21:34 by admin