skip to navigation
skip to content

name2time 0.2

A simple utility to set the modified and accessed timestamps on files according to their filenames

I’ve created this little script in order to make my picture collections more sortable. It will timestamp files in a directory tree according to each file’s name. It supports various different file extensions with optional prefixes and suffixes. Also, it uses a datetime.datetime.strptime to extract the time from the filename, so it’s easily changeable to suit your needs. Out of the box it supports the following:

  • prefixes: [‘IMG’, ‘PIC’, ‘PANO’, ‘VID’] or no prefix
  • file types (extensions): [‘.JPG’, ‘.JPEG’, ‘.MP4’]
  • date format: %Y%m%d_%H%M%S, eg: 20150131_120017

Installation: pip install name2time

OR

Clone the project & run from source

Usage: name2timestamp [–fmt FORMAT] [-y or –yes] DIRECTORY

Download: Download from pypi: https://pypi.python.org/pypi/name2time Checkout source: https://github.com/aleksandarristic/name2time/

 
  • Author: Aleksandar Ristic
  • Maintainer: Aleksandar Ristic
  • Home Page: https://github.com/aleksandarristic/name2time/
  • Download URL: https://github.com/aleksandarristic/name2time
  • License:
    The MIT License (MIT)
    
    Copyright (c) 2015 Aleksandar Ristic
    
    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:
    
    The above copyright notice and this permission notice shall be included in all
    copies or substantial portions of the Software.
    
    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    SOFTWARE.
  • Categories
  • Package Index Owner: aleksandar.ristic
  • DOAP record: name2time-0.2.xml