First of all, can't we put this into a script, instead of one line.
maybe try something like:
for i in `head -n 1`
cd `find . -name $i -printf %h`
btw, the problem was in the two sets of quotes.. the shell can't tell where one ends and the next one starts.
ie. you were executing:
cd `find . -name `
check out 'man wc'
maybe 'wc -l' will work for what you want.