I have a few directories on my site related to my content management system that I don't want indexed by Google or the other SE's. Not that there's any harm in having them indexed; it's just that they're always redirected to my generic login page, which is thus indexed several times. I'd like to use robots.txt to exclude those directories since they serve no useful purpose to the SE's.
However, the directories are generated dynamically from time to time as modifications to the CMS are made. The only thing they'll have in common is the first eight letters of the directory name. After those first eight letters will be maybe eight or ten random numbers. (Bad for SEO, I know, but it's a third-party script...)
Is there any way to simply exclude those directories, categorically, using robots.txt? Remember I don't know what they'll be in the future, so I need to exclude them based only on the first eight characters of the directory name. Can that be done, and if so, how?
Also, given that these pages are already indexed, is there a safe way to remove them without affecting the rankings of my other pages?