Hi All,
i have created how to read file and then insert to NAV
like this
SFile.TEXTMODE(TRUE);
SFile.WRITEMODE(FALSE);
SFile.OPEN(GLSetup."Import Path" + 'TestItem.txt');
REPEAT
//codeinsert to NAV
UNTIL SFile.POS = SFile.LEN;
but this one is I did it using hardcode
which is only can read TestItem.txt
how to read all the txt file in
GLSetup."Import Path" ??
and how to read only the file which start with "ABC" ?
thanks
Answers
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
SFile is datatype file, is it?
i cant do setrange
Use that for Filtering..
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
and how about to change the file name ?
this part -->
for example i just want to read every txt file start with "ABC"
Add your Name filter just below Path..
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
now it works
thanks for your help
final code
\:D/ \:D/
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
the code so far is:
Local Vars:
Name DataType Subtype Length
(next 3 lines give error)
? How to get text lines in the file into lvString?
I am obviously missing something key here, I can find my .txt files, I then need to read each file and for each line in the file insert to a field in a table.
Use LVFile1 instead of LVFile
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
LVfile1.TEXTMODE(TRUE);
LVFile1.WRITEMODE(FALSE);
LVFile1.OPEN(lvFile.path + lvfile.name);
next question is how do I read the data within lvFile1 into a table?
How to find Dataport imported file path.
My requirement is to find the path of the file selected by user and create an exception file in the same path
Thanks
Chowdary