I would like to select any one ".xls" file in a directory. The problem is the dir can return different types.
gci *.xls
will return
- object[] if there is more than one file
- FileInfo if there is exactly one file
- null if there is no files
I can deal with null, but how do I just select the "first" file?