Tracy Boggiano has a lengthy script which dynamically builds out files and filegroups for you:
Here are the six different ways you can run this procedure to files and filegroups for your database:
Set up partitions with a set size for each file
Set up partitions based on the size of a table
By monthly date range with a set size for each file
By monthly date range with sized based on the size of a table
One file with a set size
One file based on the size of a table
She then has examples for each call, so check it out.