def writeBatch(detination_dir,batchFileSet,folder_pattern): addpath=sep # temp fix to file from date = 0 if batchFileSet[0][0] != -1: addpath = timeToString(folder_pattern,batchFileSet[0][0],MILLI_OFFSET) # folder is created with the time of the first file (start time of burst). This keeps bursts together even if they cross a "new day" if len(batchFileSet) > 1: addpath+= sep + timeToString(BATCH_FOLDER_MASK,batchFileSet[0][0]) for i in batchFileSet: if i[0] != -1: # we only remove the date from file name if exif is there, exif is trusted over windows file time if RENAME_FILES_BOOL == False: smartMoveFile(i[1],detination_dir,addPath=addpath,removeDateBool=True,appendDate=None) else: smartMoveFile(i[1],detination_dir,addPath=addpath,appendDate=i[0]) else: noEXIFHandeler(i[1],detination_dir)
def noEXIFHandeler(filename,detination_dir): path = NO_EXIF_FOLDER_MASK + sep + getFileParts(filename)[2].upper() if RENAME_FILES_BOOL == False: smartMoveFile(filename,detination_dir,addPath=path,removeDateBool=True,appendDate=None) else: smartMoveFile(filename,detination_dir,addPath=path)
def writeToResolutionFolders(file_array,destination_dir): for i in file_array: addPath = i[0] smartMoveFile(i[1],destination_dir,addPath=addPath)