def copyfiles(filelist, dest, copy=False, create_new=False):
 outfiles = filename_to_list(dest)
 newfiles = []
 for (i, f) in enumerate(filename_to_list(filelist)):
  if isinstance(f, list):
   newfiles.insert(i, copyfiles(f, dest, copy=copy, create_new=create_new))
  else:
   if (len(outfiles) > 1):
    destfile = outfiles[i]
   else:
    destfile = fname_presuffix(f, newpath=outfiles[0])
   destfile = copyfile(f, destfile, copy, create_new=create_new)
   newfiles.insert(i, destfile)
 return newfiles

def copyfiles ( filelist , dest , copy = False , create_new = False ) : outfiles = filename_to_list ( dest ) newfiles = [ ] for ( i , f ) in enumerate ( filename_to_list ( filelist ) ) : if isinstance ( f , list ) : newfiles . insert ( i , copyfiles ( f , dest , copy = copy , create_new = create_new ) ) else : if ( len ( outfiles ) > 1 ) : destfile = outfiles [ i ] else : destfile = fname_presuffix ( f , newpath = outfiles [ 0 ] ) destfile = copyfile ( f , destfile , copy , create_new = create_new ) newfiles . insert ( i , destfile ) return newfiles
copy or symlink files in filelist to dest directory .