How can we export/import file from FTP server?
 
            
                
                    kenl                
                
                    Member Posts: 182                
            
                        
            
                    Hello,
I need to export/import file from a FTP site. How can I do it in Navision 4.0 ?
Thanks.
                I need to export/import file from a FTP site. How can I do it in Navision 4.0 ?
Thanks.
0                
            Comments
- 
            kenl wrote:Hello,
 I need to export/import file from a FTP site. How can I do it in Navision 4.0 ?
 Thanks.
 unless the ftp drive is internal in your house so you can map it up as a drive with the rights you need you cant..
 you must transfer it to a local or network disc to import / export..
 you could use external programs to transfer the data from ftp to a networ drive though.0
- 
            Hi
 You can program a bat-/cmd-file and start this with shell command from navision. Hope this helps.0
- 
            Here is an example of a codeunit I wrote that may do what you need:
 Name DataType Subtype Length
 VirtFile Record File
 CommandString := 'E:\data\Batch\ftp.bat';
 CmdReturnCode := SHELL(CommandString);
 ImportDir := 'E:\data\TT';
 VirtFile.SETRANGE(Path, 'E:\');
 IF VirtFile.FIND('-') THEN ;
 VirtFile.SETRANGE(Path, ImportDir);
 VirtFile.SETFILTER(Name, '*.TXT');
 VirtFile.SETRANGE("Is a file", TRUE);
 IF VirtFile.FIND('-') THEN
 REPEAT
 IF STRPOS(VirtFile.Name,'BIDS') > 0 THEN
 DATAPORT.RUNMODAL(50024,FALSE)
 ELSE IF STRPOS(VirtFile.Name,'SALES') > 0 THEN
 DATAPORT.RUNMODAL(50025,FALSE)
 ELSE IF STRPOS(VirtFile.Name,'DUMP_AUCTION') > 0 THEN
 DATAPORT.RUNMODAL(50031,FALSE)
 ELSE IF STRPOS(VirtFile.Name,'DUMP_SUBSCRIBERS') > 0 THEN BEGIN
 DATAPORT.RUNMODAL(50030,FALSE);
 IF STRPOS(VirtFile.Name,'DUMP_SUBSCRIBERS_UML_CO_C') > 0 THEN
 DATAPORT.RUNMODAL(50026,FALSE)
 ELSE IF STRPOS(VirtFile.Name,'DUMP_SUBSCRIBERS_UML_CO_S') > 0 THEN
 DATAPORT.RUNMODAL(50027,FALSE)
 ELSE IF STRPOS(VirtFile.Name,'DUMP_SUBSCRIBERS_UML_SC_S') > 0 THEN
 DATAPORT.RUNMODAL(50028,FALSE)
 ELSE IF STRPOS(VirtFile.Name,'DUMP_SUBSCRIBERS_UML_SC_C') > 0 THEN
 DATAPORT.RUNMODAL(50029,FALSE);
 END;
 //CommandString := 'MOVE E:\data\XX\' + VirtFile.Name + 'E:\data\XXold\';
 //SHELL(CommandString);
 FILE.RENAME ('E:\data\XX\' + VirtFile.Name, 'E:\data\XXold\' + VirtFile.Name);
 UNTIL VirtFile.NEXT <= 0;David Machanick
 http://mibuso.com/blogs/davidmachanick/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
- 322 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


