Sort and write items to a file
Sort and write items to a file with their ordinals
Find and write the names of subdirectories to a file