+ Added Code to sort files into folders

+ this change set creates folders based on the file creation year (
file “creation year” was hacked too , we had to use mdls , and store
them prior to uploading in a separate file)

+ All the files will be downloaded in to the appropriate folder based
on the creation year looked up in the “creation.txt” file.

==========================================

Prabhus-MBP:cloudrate_test Hari$ python cloudcrate.py download

   ____ _                 _      ____           _
  / ___| | ___  _   _  __| |    / ___|_ __ __ _| |_ ___
 | |   | |/ _ \| | | |/ _` |   | |   | '__/ _` | __/ _
 | |___| | (_) | |_| | (_| |   | |___| | | (_| | ||  __/
  \____|_|\___/ \__,_|\__,_|    \____|_|  \__,_|\__\___|

  Usage : python cloudcrate.py
  ============================
  Available tasks:

	setup      ................ If you are using cloudcrate for the first
time , Run 'cloudcrate setup' to install all dependencies.
                                      command: python cloudcrate.py
setup
	sync       ................ Run Sync from the cloudcrate folder to
sync to the cloud
                                      command: python cloudcrate.py
sync
	download   ................ Run Download and all files are
automatically downloaded to folder s3_downloads on the Desktop
                                      command: python cloudcrate.py
download

Establishing connection to AWS
Connected,Getting bucket
 ==== Loading the json from the disk to memory ==
==========creation time dict looks as below =====
Dexter-dexters-laboratory.jpg 2014
alberteinstein.jpg 2014
creation_time.txt 2014
dexters-lab-tv-12.jpg 2014
johnny-bravo1395312667.jpg 2014
einstein.010.jpg 2014
crosscheck-test.txt 2009
Dexter-dexters-laboratory-13130752-445-620.jpg 2014
after_effect_for_mac-wallpaper-1680x1050.jpg 2014
dexter__s_laboratory_by_mac6288-d53i8da.jpg 2014
IDW-Dexters-Laboratory-Comic-main.png 2014
DeeDee-3.jpg 2014
Dexter_Ego_Trip_VHS.jpg 2014
dexter-s-laboratory-science-ain-t-fair-windows-screenshot.jpg 2014
DeeDee-dexters-445-629.jpg 2014
dexter_s_lab_facebook_cover_page_by_candynapkin-d6iv94x.png 2014
clip-art-dexters-laboratory-066458.jpg 2014
cloudcrate.py 2014
Imgres-2.jpeg 2014
.DS_Store 2014
Dexters Laboratory-002.jpg drat
johnny-bravo.jpeg 2014
Jonny-quest-logo.jpg 2014
dd-3.gif 2014
1605588.jpg 2014
dexter__s_laboratory_by_mawscm-d43z8m8.png 2014
dl_jonny_quest_733x270.jpg 2014
last_modified.txt 2014
Uncharted-2-drake-hanging-psd63717.png 2012
hello.txt 2014
download.jpeg 2014
download_last_modified.txt 2014
1872944-dexterslaboratorywallpaper800.jpg 2014
Dexter-and-DeeDee-dexters-laboratory-13130813-445-411.jpg 2014
Dexter's_Laboratory_title.jpg 2014
=================================================
====================================================
Looks like you havent downloaded the files even once
====================================================
Created a folder of name s3_downloads on your Desktop
====================================================
======= Creating the following local folders =======
set([u'2014', u'2009', u'2012', u'drat'])
====================================================
Created local folder of name  2014
Created local folder of name  2009
Created local folder of name  2012
Created local folder of name  drat
inside the download loop
Added a key to the last modified dictionary == 2014-12-28T00:49:31.000Z
Debug Message : 2014
Downloaded file from fresh download code block  .DS_Store
inside the download loop
Added a key to the last modified dictionary == 2014-12-27T10:09:52.000Z
Debug Message : 2014
Downloaded file from fresh download code block  1605588.jpg
inside the download loop
Added a key to the last modified dictionary == 2014-12-27T10:09:54.000Z
Debug Message : 2014
Downloaded file from fresh download code block
1872944-dexterslaboratorywallpaper800.jpg
inside the download loop
Added a key to the last modified dictionary == 2014-12-27T10:09:41.000Z
Debug Message : 2014
Downloaded file from fresh download code block  DeeDee-3.jpg
inside the download loop
Added a key to the last modified dictionary == 2014-12-27T10:09:43.000Z
Debug Message : 2014
Downloaded file from fresh download code block
DeeDee-dexters-445-629.jpg
inside the download loop
Added a key to the last modified dictionary == 2014-12-27T10:09:58.000Z
Debug Message : 2014
Downloaded file from fresh download code block
Dexter's_Laboratory_title.jpg
inside the download loop
Added a key to the last modified dictionary == 2014-12-27T10:09:59.000Z
Debug Message : 2014
Downloaded file from fresh download code block
Dexter-and-DeeDee-dexters-laboratory-13130813-445-411.jpg
inside the download loop
Added a key to the last modified dictionary == 2014-12-27T10:10:00.000Z
Debug Message : 2014
Downloaded file from fresh download code block
Dexter-dexters-laboratory-13130752-445-620.jpg
inside the download loop
Added a key to the last modified dictionary == 2014-12-27T10:10:01.000Z
Debug Message : 2014
Downloaded file from fresh download code block
Dexter-dexters-laboratory.jpg
inside the download loop
Added a key to the last modified dictionary == 2014-12-27T10:10:07.000Z
Debug Message : 2014
Downloaded file from fresh download code block  Dexter_Ego_Trip_VHS.jpg
inside the download loop
Added a key to the last modified dictionary == 2014-12-27T10:10:08.000Z
Debug Message : drat
Downloaded file from fresh download code block  Dexters
Laboratory-002.jpg
inside the download loop
Added a key to the last modified dictionary == 2014-12-27T10:10:20.000Z
Debug Message : 2014
Downloaded file from fresh download code block
IDW-Dexters-Laboratory-Comic-main.png
inside the download loop
Added a key to the last modified dictionary == 2014-12-27T10:09:47.000Z
Debug Message : 2014
Downloaded file from fresh download code block  Imgres-2.jpeg
inside the download loop
Added a key to the last modified dictionary == 2014-12-27T10:09:49.000Z
Debug Message : 2014
Downloaded file from fresh download code block  Jonny-quest-logo.jpg
inside the download loop
Added a key to the last modified dictionary == 2014-12-27T10:09:50.000Z
Debug Message : 2012
Downloaded file from fresh download code block
Uncharted-2-drake-hanging-psd63717.png
inside the download loop
Added a key to the last modified dictionary == 2014-12-27T10:09:55.000Z
Debug Message : 2014
Downloaded file from fresh download code block
after_effect_for_mac-wallpaper-1680x1050.jpg
inside the download loop
Added a key to the last modified dictionary == 2014-12-27T10:09:39.000Z
Debug Message : 2014
Downloaded file from fresh download code block  alberteinstein.jpg
inside the download loop
Added a key to the last modified dictionary == 2014-12-27T10:09:57.000Z
Debug Message : 2014
Downloaded file from fresh download code block
clip-art-dexters-laboratory-066458.jpg
inside the download loop
Added a key to the last modified dictionary == 2014-12-27T10:19:16.000Z
Debug Message : 2014
Downloaded file from fresh download code block  cloudcrate.py
inside the download loop
Added a key to the last modified dictionary == 2014-12-28T00:49:32.000Z
Debug Message : 2014
Downloaded file from fresh download code block  creation_time.txt
inside the download loop
Added a key to the last modified dictionary == 2014-12-28T00:49:32.000Z
Debug Message : 2009
Downloaded file from fresh download code block  crosscheck-test.txt
inside the download loop
Added a key to the last modified dictionary == 2014-12-27T10:09:41.000Z
Debug Message : 2014
Downloaded file from fresh download code block  dd-3.gif
inside the download loop
Added a key to the last modified dictionary == 2014-12-27T10:10:01.000Z
Debug Message : 2014
Downloaded file from fresh download code block
dexter-s-laboratory-science-ain-t-fair-windows-screenshot.jpg
inside the download loop
Added a key to the last modified dictionary == 2014-12-27T10:10:02.000Z
Debug Message : 2014
Downloaded file from fresh download code block
dexter__s_laboratory_by_mac6288-d53i8da.jpg
inside the download loop
Added a key to the last modified dictionary == 2014-12-27T10:10:05.000Z
Debug Message : 2014
Downloaded file from fresh download code block
dexter__s_laboratory_by_mawscm-d43z8m8.png
inside the download loop
Added a key to the last modified dictionary == 2014-12-27T10:10:07.000Z
Debug Message : 2014
Downloaded file from fresh download code block
dexter_s_lab_facebook_cover_page_by_candynapkin-d6iv94x.png
inside the download loop
Added a key to the last modified dictionary == 2014-12-27T10:10:12.000Z
Debug Message : 2014
Downloaded file from fresh download code block  dexters-lab-tv-12.jpg
inside the download loop
Added a key to the last modified dictionary == 2014-12-27T10:10:16.000Z
Debug Message : 2014
Downloaded file from fresh download code block
dl_jonny_quest_733x270.jpg
inside the download loop
Added a key to the last modified dictionary == 2014-12-27T10:10:16.000Z
Debug Message : 2014
Downloaded file from fresh download code block  download.jpeg
inside the download loop
Added a key to the last modified dictionary == 2014-12-27T10:09:45.000Z
Debug Message : 2014
Downloaded file from fresh download code block
download_last_modified.txt
inside the download loop
Added a key to the last modified dictionary == 2014-12-27T10:10:18.000Z
Debug Message : 2014
Downloaded file from fresh download code block  einstein.010.jpg
inside the download loop
Added a key to the last modified dictionary == 2014-12-27T10:09:46.000Z
Debug Message : 2014
Downloaded file from fresh download code block  hello.txt
inside the download loop
Added a key to the last modified dictionary == 2014-12-27T10:09:47.000Z
Debug Message : 2014
Downloaded file from fresh download code block  johnny-bravo.jpeg
inside the download loop
Added a key to the last modified dictionary == 2014-12-27T10:09:48.000Z
Debug Message : 2014
Downloaded file from fresh download code block
johnny-bravo1395312667.jpg
inside the download loop
Added a key to the last modified dictionary == 2014-12-28T00:49:33.000Z
Debug Message : 2014
Downloaded file from fresh download code block  last_modified.txt
set([u'2014', u'2009', u'2012', u'drat'])
End of Download

=====================================