I think that logic's right - but I'd advise you test it with non-critical data first.
It looks as though you might have a few syntax errors though - try something like this:
Code:
#!/bin/bash
cd /dir1
for name in `ls`; do
cat $name >> /dir2/$name
done
Also bear in mind this won't get any files whose names begin with a dot, and that interesting things could happen if dir1 contains any subdirectories.