Question: How to select files in directory with different extensions in one call?

To select all pdf files in folder the command is

L1:=FileTools:-ListDirectory(currentdir(),'all','select'="*.pdf");

And to select all dvi files the command is 

 L2:=FileTools:-ListDirectory(currentdir(),'all','select'="*.dvi");

Is there a syntax to select both in one command? THis does not work as input to select must be string. It can not be list nor set.

  FileTools:-ListDirectory(currentdir(),'all','select'=["*.dvi","*.pdf"]);

So I end up doing

L1:=FileTools:-ListDirectory(currentdir(),'all','select'="*.pdf");
L2:=FileTools:-ListDirectory(currentdir(),'all','select'="*.dvi");
the_list := [ op(L1), op(L2) ];

If will be nice if Maple allows one to select based on different extensions in one command.  Imagine you have 5 different extensions to select. Now one has to issue 5 different commands, then collect all the 5 lists into one.

Please Wait...