cp -a `ls | grep -v yourexcludepattern` ../destinationdir/
Assume, you want to copy all files, except *.java within from the current directory to the foo directory. Then, the command would be,
cp -a `ls | grep -v *.java` /home/wageesha/foo
cp -a `ls | grep -v yourexcludepattern` ../destinationdir/
cp -a `ls | grep -v *.java` /home/wageesha/foo
for dir in *; do [ -d "$dir" ] && cp file.txt "$dir" ; done
for dir in *; do [ -d "$dir" ] && cp -rf /home/wageesha/images "$dir" ; done