Counterpart to "ProcessPath"

Posted by Lee P12462 on June 29, 2008

ProcessPath takes a c:\dir1\dir2\filename.ext and splits it into drive(c), dirpart(\dir1\dir2) and filepart (filename.ext).

Is there a corresponding procedure that takes those three pieces and makes the c:\dir1\dir2\filename.ext from them?

I basically want to change filename.ext to something different but I can't find a procedure to do that. ChangeFileExt lets me change the .ext but I want to change the filename too.

I have a work around (filespec := Drive + ':' + dirpart + '\' + mynewfilepart) but I can't help but think I'm missing something obvious.

Any ideas?

Thanks, Lee

Related articles


Follow Ups