I have a site that we have recently moved to a new URL. We want it to remain under the old URL for about a year because we have marketing brochures that have the old URL in them. These brochures are being phased out over the next year.
I don't want Google to think I'm spamming them with the site under multiple urls.
Should I write a robots.txt to tell spiders (google's in particular) not to spider the site under the old url?
If so, how would that code appear in the robots.txt file?
The only way google recognizes a URL change without thinking that you're doing sneaky redirects is to use a 301 moved permanently redirect. You can do this in your .htaccess file. It has nothing to do with the robots.txt file.
In your case, if you add a 301 to olddomain, all your brochure visitors to olddomain will get instantly redirected to newdomain, so you won't have to tell them later which domain to go to. Googlebot will also get instantly redirected to newdomain, and they'll stop spidering olddomain.
You should also contact all your inbound links and get them to change to newdomain.