# Relative path issue with epslatex

I'm trying to include a figure which is saved as two files (eps and tex). I can get it to work if the files are in the same folder as the main document, but not if I move them elsewhere, even just to a subdirectory.

I'm using Windows 7, TexnicCenter, and miktex 2.9.

This is what I've tried to do:

\documentclass{article}

\usepackage{graphicx,epstopdf}

\begin{document}

\begin{figure}

\input{ImageDir/TestFile}

\end{figure}

\end{document}


It doesn't work. If I move the "TestFile" files out of "ImageDir" and change the above to "\input{TestFile}" then it works fine. Also the code below DOES work for png image file, and I don't understand the difference:

\documentclass{article}

\usepackage{graphicx}

\begin{document}

\begin{figure}

\includegraphics{ImageDir/TestPNG}

\end{figure}

\end{document}


I've been searching the internet and tried different syntax for the path but I just can't get the \input version to work with files in a different directory. Does anyone know what I'm doing wrong?

Thanks a lot for any help!

 \input{ImageDir/TestFile}

then Testfile.tex has \includegraphics{TestFile.eps} but file inclusion is always relative to the working directory where TeX is started, not relative to teh file being processed. So TeX looks in the current directory for the image.
The simplest is just to put it in the working directory, or if not, to put the directory in the search path either add it to the TEXINPUTS kpathsea variable or to add it to the graphics path with \graphicspath{{ImageDir/}} (which is slower but can be more convenient).