Hi
@ll,
i look for an .ocx or a .dll, that throws an event if it detects a new file in a specified folder. I´d like to use the NAS and a single instance codeunit to control this folder. If there is a new file in the folder, i´d like to import it immediatly.
Has anyone an idea?
Thank´s a lot!
Comments
Best you use a loop in a single instance code unit. This loop checks the existence of file every x seconds.
Hope this helps
Thomas
If you use the Navision-Timer for the Loop, you can use the ErrorEvent of that automation object. Great for errorhandling/logging, since the parameter errortext contains the complete errortext (similar to getlasterror in Navision 5.0).
If you just test with virtual table 2000000022:"File" with some filters on it, before filtering the correct subdir+files, you first have to filter some other subdir and do a FINDFIRST and then put the correct filters and FINDSET.
This because if you always search the same place, Navision does not update the virtual table and thus you won't find new files.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Benny Giebens
There are many functions to handle directories and files.
regards