Answer

To get  just the  filename without the extension do the following:

NSString *inputStr = @"/opt/app/license.txt";

NSString* fname = [[inputStr lastPathComponent] stringByDeletingPathExtension];

// results in fname = license