# Include section numbering in list from tocloft package

I want to include a list of appendices after my ToC, which I to some extent have managed, with this code:

\usepackage[titles]{tocloft}
\usepackage{tocloft}

\newcommand{\listappendicesname}{Appendices}
\newlistof{appendices}{apc}{\listappendicesname}
\parindent0mm


and by using the command

\listofappendices


after my ToC and

\appendices{*name of appendix*}


under the specific appendix section I want to include.

The problem is, that in my text, the appendices is numbered A.1, A.2 etc, but in my tocloft list, they only appear as "name of appendix".

Is there any way I can add the section numbering to my list?

As long as \addcontentsline{...}{...}{#1} is used there will be no numbering. The usual way is to use \addcontentsline{...}{...}{\theappendices~#1}, i.e. printing the appendix number before the title.

I hope, that the appendix package is not used as well, otherwise this would cause a conflict with the appendices environment.

The way \appendices (in the OP) was defined is incomplete, it does neither print the title in the text nor does it make any use of the appendices counter by incrementing. Since it is very likely that there might be references to the relevant appendix section I've decided to use \refstepcounter{appendices}.

The \section*{#1 \theappendices} is just for convenience and can be replaced by other typesetting 'eye-candy' at will.

Also use \parindent=0em rather than \parindent=0mm

\documentclass{book}

\usepackage[titles]{tocloft}
\usepackage{tocloft}

\newcommand{\listappendicesname}{Appendices}
\newlistof{appendices}{apc}{\listappendicesname}
\newcommand{\appendices}[1]{%
\refstepcounter{appendices}%
\section*{#1 \theappendices}%
}

\usepackage{blindtext}

\parindent=0em

\begin{document}
\tableofcontents
\listofappendices

\blinddocument
\appendices{Foo One}
\appendices{Foo Two}
\end{document}