Hi all,

I need some advise on how to handle multiple possibilities in the way of files from the command line. I'm not asking how to use command-line arguments, but how best to handle possible parameters.

For example, I have a command-line tool that will accept the following file possibilities:

singleFile.fm
*.fm
---------------
single.bk
single.book
single.fmb
*.bk
*.book
*.fmb
---------------
*.*

I'm looking for some advice/ideas on how to handle such a wide range of file input possibilities. As you can see, it can be a single file, all files of a particular extension, or all files within the directory.

Your thoughts appreciated!