Windows does not know how to handle files or folders whos name ends in a space. Usually Windows won’t allow you to delete these files, and other bizarre behavior.
This is a simple bash command to fix that.
find . -name '* ' -exec sh -c 'x="{}"; mv "$x" "${x%?}"' \;