Herman,
Try combining the path and filename while still in AFL, then use an
AFL variable reference from within the vbscript. My expectation would
be that you could do something along the lines of the following:
...
procedure SortFile(FilePath, FileName) {
local QualifiedFileName = FilePath + FileName;
EnableScript("vbscript");
<%
...
Set objFile = objFSO.OpenTextFile(AFL("QualifiedFilePath"),
ForReading)
...
Set objFile = objFSO.OpenTextFile(AFL("QualifiedFilePath"),
ForWriting)
...
%>
}
...
Mike