I have a problem loading a file, as I'm passing a relative path to the function FileExists(Filename: String)
and it's returning false, that is, it does not find the file in the directory that I pass.
I have a file named Template.html
in the D:\Programming\Delphi\Projects\SendMail
directory, and a service written in Delphi whose .EXE
is in the D:\Programming\Delphi\Automation
directory. I am passing the relative path: .\..\Projects\SendMail\Template.html
to FileExists()
, but it's returning that the file does not exist.
I think that has something to do with the relative path of a service and the relative path of the application being different. Can anybody help me with this?