Options

Read Client Files in Folder

jordi79jordi79 Member Posts: 272
edited 2014-05-06 in NAV Three Tier
Hi,
I have read the thread:

viewtopic.php?f=32&t=57342&start=0

and have managed to get it running on a 2 tier. But on a 3 tier, it seems that it cannot read the files.

My code is:
Name	DataType	Subtype	Length
dn_Folder	DotNet	System.IO.Directory.'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'	
dn_Lst	DotNet	System.Collections.Generic.List`1.'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'	
dn_Obj	DotNet	System.Object.'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'	
i	Integer		

dn_Obj := dn_Folder.GetFiles(FORMAT('c:\New'), '*.*');
dn_Lst := dn_Lst.List;
dn_Lst.AddRange(dn_Obj);
IF dn_Lst.Count > 0 THEN BEGIN
  FOR i := 0 TO dn_Lst.Count - 1 DO BEGIN
    message(FORMAT(dn_Lst.Item(i)));
  END;
END;

And the error message is:

Microsoft Dynamics NAV

A call to System.IO.Directory.GetFiles failed with this message: Could not find a part of the path 'c:\New'.
OK

The question is how do I upload the folder to the server?

Comments

Sign In or Register to comment.