Find all files in the current directory (and its subdirectories) whose name contains any characters, and use xargs to run the sed command to replace all whitespace characters with nothing.
find . -iname "*.*" | xargs sed -i 's/\s+//g'