Find all files and directories and redirect the output to /dev/null, then use xargs to pass the output to sed to replace the last part of the path with "newvalue".
find -name \* | tee /dev/null | xargs sed -i 's/[^/]\+$/newvalue/'