I suggest using a similar pattern to the linux methods that are dealing with lists of files as above.