Peter, Benjamin,
I have exiftools and stat installed, but the screenshots are PNG files so I
tried it with JPEG Images, with these EXIF data is present but it moves
them to the destination folder, creates a .jpeg file and keeps overwriting
it with each file it deletes from the source. See Errors below. Looks like
it fails there is an issue with the LMDATE vs DATE command which then fails
the creation of a new folder and proper moving of the processed file....
=========================
dbwente-mac:source dbwente$ ./mike
Scanning for *.jpg...
./SAM_5072.JPG: Checking EXIF... found: 2012:09:10 09:56:17
usage: date [-jnu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]]
...
[-f fmt date | [[[mm]dd]HH]MM[[cc]yy][.ss]] [+format]
Will rename to .jpeg
sed: 1: "y/:///": transform strings are not the same length
Moving to /Users/dbwente/Pictures/SCREENSHOTS/destination//.jpeg ... done.
./SAM_5073.JPG: Checking EXIF... found: 2012:09:10 09:56:24
usage: date [-jnu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]]
...
[-f fmt date | [[[mm]dd]HH]MM[[cc]yy][.ss]] [+format]
Will rename to .jpeg
sed: 1: "y/:///": transform strings are not the same length
Moving to /Users/dbwente/Pictures/SCREENSHOTS/destination//.jpeg ... done.
./SAM_5074.JPG: Checking EXIF... found: 2012:09:10 09:56:30
usage: date [-jnu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]]
...
[-f fmt date | [[[mm]dd]HH]MM[[cc]yy][.ss]] [+format]
Will rename to .jpeg
sed: 1: "y/:///": transform strings are not the same length
Moving to /Users/dbwente/Pictures/SCREENSHOTS/destination//.jpeg ... done.
================
In the destination folder I have a single .jpeg UNIX file as a result of
all these transactions.
Cheers
On Sat, May 4, 2013 at 4:36 PM, Benjamin Tayehanpour <
[email protected]> wrote:
> Going after the first actual error message, I'd say the command "stat"
> doesn't do the same in OSX as it does in GNU/Linux.
> On 4 May 2013 16:05, "Daniel Bwente" <[email protected]> wrote:
>
>> Hi Guys,
>>
>> I am trying to arrange a huge amount of photos with a linux script into a
>> timestamped folder hierarchy but failing to get the script right, has
>> anyone done the same before. I am using a Mac to try out various scripts
>> found online, once I get it right i intend to run the same on my NAS that
>> has an Ubuntu variant OS.
>>
>> I found this,
>> http://mikebeach.org/2011/12/10/bash-script-to-automatically-sort-photos-into-folders-based-on-exif-data-for-ubuntu-linux/
>> edited
>> to the file attached and its deleting the photos from my source directory
>> with this error.
>>
>> ============
>> dbwente-mac:source dbwente$ ./mike
>> Scanning for *.jpg...
>> ... end of *.jpg
>> Scanning for *.jpeg...
>> ... end of *.jpeg
>> Scanning for *.png...
>> ./Screen Shot 2012-03-18 at 23.29.45 1.png: Checking EXIF... not found.
>> stat: illegal option -- -
>> usage: stat [-FlLnqrsx] [-f format] [-t timefmt] [file ...]
>> Using LMDATE:
>> usage: date [-jnu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]]
>> ...
>> [-f fmt date | [[[mm]dd]HH]MM[[cc]yy][.ss]] [+format]
>> Will rename to .cannot
>> cannot
>> cannot
>> cannot
>> cannot
>> cannot
>> sed: 1: "y/:///": transform strings are not the same length
>> Moving to /Users/dbwente/Pictures/SCREENSHOTS/destination//.cannot
>> cannot
>> cannot
>> cannot
>> cannot
>> cannot ... done.
>> =================
>>
>> Checking my
>> destination "/Users/dbwente/Pictures/SCREENSHOTS/destination/" shows a new
>> file called ".cannot" that is overwritten for every file deleted from my
>> source " /Users/dbwente/Pictures/SCREENSHOTS/source/" I am running the
>> script from "/Users/dbwente/Pictures/SCREENSHOTS/source/"
>>
>> Is anyone able to help rectify this or offer an alternative script that
>> could do the job.
>>
>> Cheers
>>
>> --
>>
>> /Daniel
>>
>>
>>
>> _______________________________________________
>> The Uganda Linux User Group: http://linux.or.ug
>>
>> Send messages to this mailing list by addressing e-mails to:
>> [email protected]
>> Mailing list archives: http://www.mail-archive.com/[email protected]/
>> Mailing list settings: http://kym.net/mailman/listinfo/lug
>> To unsubscribe: http://kym.net/mailman/options/lug
>>
>> The Uganda LUG mailing list is generously hosted by INFOCOM:
>> http://www.infocom.co.ug/
>>
>> The above comments and data are owned by whoever posted them (including
>> attachments if any). The mailing list host is not responsible for them in
>> any way.
>>
>
> _______________________________________________
> The Uganda Linux User Group: http://linux.or.ug
>
> Send messages to this mailing list by addressing e-mails to:
> [email protected]
> Mailing list archives: http://www.mail-archive.com/[email protected]/
> Mailing list settings: http://kym.net/mailman/listinfo/lug
> To unsubscribe: http://kym.net/mailman/options/lug
>
> The Uganda LUG mailing list is generously hosted by INFOCOM:
> http://www.infocom.co.ug/
>
> The above comments and data are owned by whoever posted them (including
> attachments if any). The mailing list host is not responsible for them in
> any way.
>
--
/Daniel
_______________________________________________
The Uganda Linux User Group: http://linux.or.ug
Send messages to this mailing list by addressing e-mails to: [email protected]
Mailing list archives: http://www.mail-archive.com/[email protected]/
Mailing list settings: http://kym.net/mailman/listinfo/lug
To unsubscribe: http://kym.net/mailman/options/lug
The Uganda LUG mailing list is generously hosted by INFOCOM:
http://www.infocom.co.ug/
The above comments and data are owned by whoever posted them (including
attachments if any). The mailing list host is not responsible for them in any
way.