Generaldetecting existence of directories

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
scmal
Posts: 5
Joined: Mon Aug 18, 2008 3:50 pm

detecting existence of directories

Post by scmal »

Is there a way to get LaTeX to detect directories?
\IfFileExists doesn't do it. Minimal example:

\documentclass{article}
\IfFileExists{tmp}{\typeout{*** found ***}}{\typeout{*** not found ***}}
\begin{document}
\end{document}

If tmp is an ordinary file, it is found. If it is a directory, it isn't found. \IfFileExists{tmp/.} isn't found either.
There doesn't appear to be a command \IfDirectoryExists.
Not worth busting a gut over how to do this, but if anyone happens to know, I'd be grateful.

Mike

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

Post Reply