def update_loop(files_list, i, n):
	"""
	This function updates the i and n counter variables and the files list in 
	each iteration.
	It sums up 1 to the i and n counter vairables and substract the first file 
	of the files list and adds that file at the end of the list. 
	"""
	file = files_list.pop(0)
	files_list.append(file)
	i += 1
	n += 1
	return(files_list, i, n)