I don't have that program on my system —
in fact, I don't specifically recall hearing of it before —
but I read this copy of the man page,
and it appears that the program does not include
the functionality that you want.
However, if you especially want to do this with mmv
,
you might want to try this:
mmv -an "*.txt" bogus.target > /tmp/mmv.list
The -n
tells mmv
not to do any moves,
but just to report what it would have done if you hadn't specified -n
.
The -a
tells it to append all the text files
into the one file bogus.target
—
in fact, the man page gives a very similar example
(but without the -n
option) —
I use it here simply to persuade mmv
to allow multiple source files to collide into a single target.
This should produce a /tmp/mmv.list
file that looks something like
bar.txt -> bogus.target
baz.txt -> bogus.target
foo.txt -> bogus.target
(I assume that it will list the files
either in lexicographical (alphabetical) order,
or directory order (which may appear to be an arbitrary order).
If you want some other order,
you will need to find some way to specify that.)
Then process the file (e.g., with a script, TBD)
to replace the occurrences of bogus.target
with 1.txt
, 2.txt
, 3.txt
, etc.
Then execute
mmv < /tmp/mmv.list
Caveats: I haven't tried this
(since, as I said, I don't even have the software).
You should probably do a dry run first on some unimportant files,
and/or backup all your files before doing this.
Note also that this is probably
at least as much work as some of the answers to the questions you linked to.
As I said, I offer this suggestion
just in case you especially want to do this with mmv
.
P.S. My answer (above) was partially inspired by this one.