If I want to know it this folder exist, and the folder does not exist, I always get a error message saying that the folder does not exists. This is not what I want. I use the below method...
//Files is record.file
Files.SETRANGE(Path, 'c:\Test folder\');
exit(Files.Count>0);
0
Comments
I usually only use thsi single instruction:
IF EXISTS(path) THEN...
Nuno Silva
Guido
If it was okay the directory where was create the File exists, if is not okay, something other happens
Yes, i have try with EXISTS Path and really seems work only with filenames.
Try make an Temp File in an Specified Folder, or Export something in a textfile. And if this runs or not decide if Folder exists.
:roll:
But i'll keep it in mind.
btw, I Think I have solved the Folder thing. Now I'm working if a Drive Exists. This is a bit harder.
fso Automation 'Microsoft Scripting Runtime'.FileSystemObject
ok Boolean
strUrl Text
IF NOT CREATE(fso,FALSE) THEN EXIT;
strUrl := 'C:\Documents and Settings\All Users\';
ok := fso.FolderExists(strurl);
CLEAR(fso);
guido
Guido