The rotater script basically returns the next file in a specified directory. It keeps track of the last file name it returns, and makes sure to return the next file in the list. If it has reached the last file in the directory, it returns the first file, and increments from there. |