If a file name has spaces the open fail. i.e. NVIDIA GPU Computing SDK/OpenCL/src/oclMultiThreads/Makefile So need to escape the spaces (probably means more stuff needs escaping as well).