ocx, dll to detect a new file in an order

Rotbaerchi
Member Posts: 8
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!
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!
0
Comments
-
Hi
Best you use a loop in a single instance code unit. This loop checks the existence of file every x seconds.
Hope this helps
Thomas0 -
Thank´s for your answer!0
-
BTW:
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).0 -
1 Remark:
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.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
or you set a filter using a \ as last charin the path, and the next time without the \Rgds
Benny Giebens0 -
or you use the 'Windows Script Host Object Model'.WshShell (WSH).
There are many functions to handle directories and files.
regardsDo you make it right, it works too!0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions