FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.

» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Kubuntu User

LinkBack Thread Tools
Old 02-01-2009, 03:26 PM
David Fletcher
Default Photograph file dates

I think I might have posted this here before. It only works if you copy the
files from the camera memory directly to the hard drive so that the date
stamp that the camera put into the file properties is preserved.

My little script effectively reads the camera date stamp and then uses it to
rename the file, incorporating the date and time into the file name.

.raf is the extension my camera uses for raw files. Modify as you need, if it
looks useful to anybody.


# Use the ls command to output the date and time stamp of each file
# and awk to pick out the date and time string and the filename
for datetimefilename in $(ls --time-style=+%Y%m%d%H%M%S -l *.jpg *.raf |
awk '{ print $6$7 }')
echo $datetimefilename
# Split off the file name so that I can use it for the rename operation
echo $origfilename
mv $origfilename t$datetimefilename

kubuntu-users mailing list
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-users

Thread Tools

All times are GMT. The time now is 05:56 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org