# Bundledoc tool showing error in OS Windows 7

As per the documentation of bundledoc, I have used a simple Tex file as mentioned in the document

\RequirePackage{snapshot}
\documentclass[11pt]{article}
\begin{document}
Hello, world! \ref{sec2}
\end{document}


Where it produces a file hello.dep. The content generated inside the hello.dep are:

\RequireVersions{
*{application}{TeX}     {1990/03/25 v3.x}
*{format} {LaTeX2e}     {2011/06/27 v2.e}
*{package}{snapshot}    {2002/03/05 v1.14}
*{class}  {article}     {2007/10/19 v1.4h}
*{file}   {size11.clo}  {2007/10/19 v1.4h}
}


I ran the following command

bundledoc --config=miktex.cfg hello.dep


but it produces the below mentioned error

initexmf: --find-latex-input: unknown option
bundledoc: "initexmf --find-latex-input %BDINPUTS%" (BDINPUTS="hello.tex") failed to find hello.tex


Can anyone please guide me how to solve this error.

Thanks

-
Welcome to TeX.SX. Note that you don't have to sign with your name since it automatically appears in the lower right corner of your post. – Claudio Fiandrino Oct 21 '13 at 12:54
I wonder if the miktex.cfg file is still valid. It uses the option --find-latex-input to the MikTeX command initexmf, but that command is not listed (was it ever?) as an option here: http://docs.miktex.org/manual/initexmf.html -- which certainly explains the unknown option complaint. Perhaps you should post this on comp.text.tex, where the package author is more likely to read this (or email him directly). Unfortuantely, I don't use MikTeX or windows, so I can't test this, but I can confirm that bundledoc is great. – jon Oct 24 '13 at 2:47
The man page also says that this was only tested on Windows NT and MikTeX, which sounds like the testing happened some time ago. Perhaps initexmf did remove some other options..? – jon Oct 24 '13 at 2:48
Since you have some responses below that seem to answer your question, please consider marking one of them as ‘Accepted’ by clicking on the tickmark below their vote count (see How do you accept an answer?). This shows which answer helped you most, and it assigns reputation points to the author of the answer (and to you!). It's part of this site's idea to identify good questions and answers through upvotes and acceptance of answers. – Jubobs Feb 21 '14 at 11:22

The package is absolutely outdated in regard to the provided configuration file, as already noticed by Jon in a comment. As the error messsage shows, does the used command --find-latex-input not work and is not even mentioned in MiKTeX documentation anymore.

To get back the function one has to create an own file. Below I will provide one here. By the way: As it turned out, also TeX Live for Windows is affected.

### First

Users of MiKTeX have to download a command line tool zip.exe, in TeX Live this is already included. So, as MiKTeX user go to ftp://ftp.info-zip.org/pub/infozip/win32/, download the latest zipXXX.zip and extract at least the contained zip.exe into a folder that is included in the system path. (A note on other archive programs in post scriptum.)

### Second

Open your favorite text editor and paste the following in

# bundledoc configuration file for TeXing in Windows,
# by Steffen "Speravir" Hoffmann, licence LPPL,
# source: http://tex.stackexchange.com/a/159012/9237
#
# Derived from configuration files provided with program
# package by Scott Pakin

# ASSUMPTION: You have "zip" somewhere in your path, and it accepts the
#             command-line options utilized by the "bundle" line below.

bundle: zip -r -v -9 %BDBASE%.zip %BDINPUTS%
sink:   > NUL 2>&1
find:   kpsewhich -progname=latex \$BDINPUTS


Save it as wintex.cfg or whatever you want somewhere in your local TeXMF root (MiKTeX users: user maintained root, cf. Create a local texmf tree in MiKTeX). Pay attention, that you do not accidentally save with file extension .txt.

As experienced users will notice, this is actually built together from provided configuration files, but it works meanwhile in Windows.

### Third

Make an update of your filename data base (FNDB). Then you can use the file with the --config option. MiKTeX users should know, though, that a Perl interpreter must be separately installed in Windows, cf. MiKTeX and Perl scripts (and one Python script).

PS: In theory you can use every archive program, that works on command line. You would have to adjust the line starting with bundle in the config file. But there is one caveat: The variables %BDBASE% and %BDINPUTS% expand to a string surrounded by double quotes (change the bundle line to bundle echo %BDBASE% %BDINPUTS% and execute bundledoc with this changed version and you will see). The archiver must be able to deal with this. In a test with 7z, the commandline version of 7-Zip, I was not successful, other programs I couldn't test.

-