1. Connect to FTP server 2. Get a directory listing of the required location 3. Iterate through the list of directories and: 3.1. Disregard directories that don't match the date format 3.2. Keep record of the oldest directory (so far) 3.3. Count number of directories with date format name 4. Sanity checks (there's more than 1 valid directory, etc) 5. Delete the oldest directory found in the loop