 			if (nil == source) { continue }
 			imageFileData.append([
 				"FileName": url.lastPathComponent,
+				"FileExtension": url.pathExtension,
 				"ImageDate": getDateTime(source),
-				"FileDate": fileCreateDate
+				"FileDate": fileCreateDate,
+				"URL": url
 				]
 			)
 			if (index < 10) {

		
	}
	
	func parse(dateStr:String, format:String="yyyy-MM-dd") -> NSDate {
		var dateFmt = NSDateFormatter()
		dateFmt.timeZone = NSTimeZone(forSecondsFromGMT: 0)
		dateFmt.dateFormat = format
		let date = dateFmt.dateFromString(dateStr)!
		//println("\(dateStr) -> \(date)")

		var dateStrings : Array<String> = []
		for image in imageFileData {
			var counter : Int = 1
			var date: NSDate {
				get {
					if (dateFromSelector.selectedRow == 0) {
						return image["ImageDate"] as NSDate
					} else {
						return image["FileDate"] as NSDate
					}
				}
			}
			// add postfix
			var baseName = stringFromDate(date)
			if (postfix.stringValue != "") {
				baseName += "_\(postfix.stringValue)"
			}
			// ensure name is unique if we have files with same date
			var newFileName = "\(baseName)_\(counter++)"
			while (contains(dateStrings, newFileName)) {
				newFileName = "\(baseName)_\(counter++)"
			}
			dateStrings.append(newFileName)
			// append original name
			if (appendOriginalName.state == 1) {
				var nameWOExtension : String! = image["URL"]?.lastPathComponent
				nameWOExtension = (nameWOExtension as NSString).stringByDeletingPathExtension
				newFileName += "(\(nameWOExtension))"
			}
			// add file extension
			var ext : String! = image["FileName"]?.pathExtension
			ext = (ext as NSString).lowercaseString
			newFileName = "\(newFileName).\(ext)"
			// rename
			let oldPath : String! = image["URL"]?.path
			println("path: \(oldPath)")
			let basePath : String! = (oldPath as NSString).stringByDeletingLastPathComponent
			let newPath : String = basePath.stringByAppendingPathComponent(newFileName)
			println("newPath: \(newPath)")
			fm.moveItemAtPath(oldPath, toPath: newPath, error: nil)
			println("renamed to: \(newFileName)")
		}
	}
	
