I assume that you have also created a association with the .rpt extension to make this work, so every filename will end in .rpt, if so, You could look for the last occurrance of .rpt in the string and know that the file name is everying up to that point, and the paramters are after it.