The folowing routine solves the problem:
Does a directory <SearchDirectory> exist? If not, create it.
Var
SearchDirectory : Text200
rtFileSystem : Automation 'Microsoft Scripting Runtime'.FileSystemObject
Begin
SearchDirectory := 'C:\Temp\testdirectory';
CREATE(rtFileSystem);
IF NOT rtFileSystem.FolderExists(SearchDirectory) THEN
rtFileSystem.CreateFolder(SearchDirectory);
end;
Marcus
Marcus Fabian
m.fabian@thenet.ch
+41 79 439 78 72
Comments
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
This function recursively creates the whole structure if necessary.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
http://www.BiloBeauty.com
http://www.autismspeaks.org
Shame my parents forgot to order some memory...
PS I send to Luc "How to use recursion in Navision" with some theory, remarks and some basic and Navision examples.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Forgot to write this: the variable LAutFileSystemObject must be a local one, not a global.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
much better than doing the ISCLEAR stuff :-) thanks for the hint