I need, using NAS with a specific codeunit, to read the list of file in a specific directory and after process the files in a interface.
There's someone that has any idea to make this?
I need to read the name of all the files in a specific directory and after when the list is complete send each file a procedure that import the files in buffer records.
The problem is that the name of the file are like this:
Customer200410051453.txt
Customer200410051456.txt
ect....
I find the internal table "File" that can be used to obtain list of files in a directory and after cycle on it with the interface procedure.
The problem is that using NAS as Window Service with tha NavisionTimer 1.0 to pool the directory I don't find any command to clear the name of file readed in each program cycle.
before you check the real directory, you have to change the filters of the file-var temporaryly to another directory (i.e. "C:\") and then back to the real directory.
VirtFile.SETRANGE(Path, 'c:\');
IF VirtFile.FIND('-') THEN ;
VirtFile.SETRANGE(Path, ImportDir);
VirtFile.SETFILTER(Name, '*.*');
VirtFile.SETRANGE("Is a file", TRUE);
IF VirtFile.FIND('-') THEN
REPEAT
...
Comments
http://www.BiloBeauty.com
http://www.autismspeaks.org
The problem is that the name of the file are like this:
Customer200410051453.txt
Customer200410051456.txt
ect....
I find the internal table "File" that can be used to obtain list of files in a directory and after cycle on it with the interface procedure.
The problem is that using NAS as Window Service with tha NavisionTimer 1.0 to pool the directory I don't find any command to clear the name of file readed in each program cycle.
I hope that is more clear.
Thank you
before you check the real directory, you have to change the filters of the file-var temporaryly to another directory (i.e. "C:\") and then back to the real directory.
br
Josef Metz
Josef Metz