Heya,

I want to check whether a file name is "under" a certain directory.

i.e. is "c:\data\templates\file.txt" under the "c:\data\templates"
directory?

I would just use a simple string compare however the problem is the user can
type in a name like this as well:

"c:\data\templates\..\..\topsecret\file.txt"

Is there an existing function to resolve the actual filename or path?

Thank you,

Wilfred.

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to