sconway
3rd June 2005, 03:02
I have a need to find out if a network PC file exists from a Baan session. I have the path name and file name in a Baan table. When I combine the path and file together in a string, I get more backlashes (\) than I need. ex. path = \\serverA\directoryB\ is loaded to a string variable and becomes \\\\serverA\\directoryB\\ --- I tried strip$ and sprintf$ but did not work.

When I try to use the seq.fstat.local command with the string variable in quotes, the return code is -1 --- file does not exist.
If I use the command (with no variable) seq.fstat.local("\\serverA\directoryB\filename", num.bytes), then the return code = 0 --- file exists.

lakoon
3rd June 2005, 10:20
Hello

Just let baan do what it wants with the "\".
The compiler masks the "\" by repeating the sign.

/lakoon

erphui
9th June 2005, 11:33
please try
seq.fstat.local("\aa.txt", buflen)
or
seq.fstat.local("c:\13.txt", buflen)

Hitesh Shah
9th June 2005, 17:01
Extra backslashes are for display in debugger mode only . It actually treats it the way u have written . Maybe the file u r searching does not exist.