Neither this if (path.baseName.startsWith(something)) doThis(); nor this if (startsWith(baseName(path), something)) doThis(); but a combination of the two if (baseName(path).startsWith(something)) doThis(); make it possible to write readable sentences. -Martin