aqFileSystem to locate that a folder exists not working quite right
I'm using aqFileSystem to check that a folder exists but for some reason, the below script keeps hitting the 'else' statement even though when I debug 'sTestPath + where', the correct path is present AND that path does match what appears on the computer.
Additionally, is there a better way to remove a trailing backslash than aqString.Remove?
Thank YOU,
Morgan
(where is a case statement but essentially a path)...
where := '\StdData\'+BaseName;
sTestPath := aqString.Remove(Project.Variables.TestPath, 8, 1);
If aqFileSystem.Exists(sTestPath + where) then
begin
Log.Message('ValidReports folder present')
end
else
begin
BuiltIn.ShowMessage(Project.Variables.TestPath + where + ' folder is missing from the ValidReports folder!');
Runner.Halt(Project.Variables.TestPath + where + ' folder is missing from the ValidReports folder!');
end;
Morgan wrote:
Additionally, is there a better way to remove a trailing backslash than aqString.Remove?