 
            Another version was !391. My main concerns would be all of manual path handling, that ideally should be handled with something we have, maybe PathCch* functions? Then error codes fixups.
Sure, I guess that could save a couple lines.
Since it supports wildcard patterns, maybe we can have findnext loop in all cases to get rid of "if (!wildcard && !separator)" special case.
The reason for the special case is that if there's a wildcard or a separator, copying "src" to "dst" always copies src *into* dst, but if there's neither a wildcard nor a separator, it renames "src" to "dst".