find -name "*.js" -not -path "./directory/*"
#example
find . -name "*.py" -not -path "./anaconda2/*"
# copy the files find to a directory
find -name "*.js" -not -path "./directory/*" -exec cp {} temp/ \;
find . -name "*.py" -not -path "./anaconda2/*" -exec cp {} pycoll/ \;