I'd suggest using find for this.
Let's create some test subjects:
$ mkdir -p ./testing/test{1,2,3,4} $ touch ./testing/test{1,2,3,4}/test{a,b}
Will result in:
$ ls -R ./testing ./testing: test1 test2 test3 test4 ./testing/test1: testa testb ./testing/test2: testa testb ./testing/test3: testa testb ./testing/test4: testa testb
Now, run
$ mkdir ./testing/copy $ find ./testing/ -mindepth 1 -maxdepth 1 ! -name test1 ! -name test3 ! -name copy -execdir cp -R '{}' ./copy/ ';'
Will result in:
$ ls -R ./testing/ ./testing/: copy test1 test2 test3 test4 ./testing/copy: test2 test4 ./testing/copy/test2: testa testb ./testing/copy/test4: testa testb ./testing/test1: testa testb ./testing/test2: testa testb ./testing/test3: testa testb ./testing/test4: testa testb
Background information:
Summary: find the directories which need to be copied and execute the copy command. In this case, let's copy all directories but 'test1' and 'test3'.
The -mindepth 1 option will prevent find from including the . and possibly .. directories, since these are on depth 0.
The -maxdepth 1 option will prevent find from copying every single subdirectory individually. The command cp -R handles the subdirectories, so they are covered.
Use -execdir instead of -exec, so you don't have to include the whole path as the target directory for cp command.
DO NOT forget to mkdir your target directory before running find, and DO NOT forget to exclude this directory from the result! Hence the ! -name copy option in my example.
I hope this points you in the right direction.