The following code
\documentclass{article}
\usepackage{filecontents}
\begin{filecontents*}{"a b c.tex"}
one
two
\end{filecontents*}
\usepackage{listings}
\usepackage{hyperref}
\begin{document}
\lstinputlisting[caption={\url{a b c.tex}}]{"a b c.tex"}
\end{document}
produces a hyperlink with suppressed spaces given in the path.
How to prevent \url from removing the spaces in a path?



%20. It's annoying, and ugly, but clearer for someone who may be copying your URL, as users do not expect URLs to contain spaces. – TRiG Oct 13 '12 at 23:22%20). See RFC 1738. – Paul Gaborit Jan 2 at 22:33