Import 2 or more csv file data to the table If path of the file selected by user


I Import a .csv file data into table to use codeunit. I am not using XMLPORT for this. If the same pk field data comes again then old related fields updated by new data. this is done perfectly. but now i have to import more than one csv files.

so how can i do this because in my code i have open only one file

Are you using two different tables or data from two csv file in one table ??

Thanks Amol,

I am using two or more csv file which is in the folder to single table.

Reply me pls


Is both the CSV contains different data or you have split the csv file into two files for faster updation in database. ??

Hi Amol,

I have resolved my problem.

now i want when I import data from the file then that file transfer from that folder to another.

Reply me pls.



Look At Close function: (close orig file)

Then Copy Function (copy the file to a new location)

then Erase Function (erase the orig file)

I tried to post something but I got a moderator pending pop-up [:(]

The post that currently doesn’t show just mentioned you look at CLOSE,COPY& ERASE functions

get more details here:

Thanks for your Reply,

Now i have another problem is when I run codeunit then if any blank file exist in the folder that gives error otherwise which files have data that import to table and transfer to another folder and erase from that folder so now i need to skip blanks files in the folder. so which function i use for this.