I want a command which takes as input, a tex file, and a list of directories. It should (recursively) identify any files the tex file depends on (
\includegraphics) and copy them into the current directory.
The advantage of this is the ability to reuse and modify material from old papers and talks to new ones (without destroying the old ones).
Typical scenario: I want to give a talk which introduces the same material as a previous talk. I copy the beamer presentation from the previous talk and strip out the irrelevant stuff. Now I manually copy over the images I want to keep. I then modify some of those images and create the rest of the presentation...
Does this exist already?