hello I meet a issue based on the Virtual Table: file in Navision 2009,can I discuss with you? I am doing the code like:
(the ImportFile is the record based on File Record)
ImportFile.RESET;
ImportFile.SETRANGE(Date,WORKDATE);
ImportFile.SETRANGE(Path,ImportPath);
ImportFile.SETRANGE("Is a file",TRUE);
ImportFile.SETFILTER(Name,'%1','con_*.csv'); //Jerry Edited
//Jerry add this coding to pick the Sales/transfer Order from many input files,
//and then prepare for the function ImportData pick the correct data
IF ImportFile.FIND('-') THEN
REPEAT
FileName := ImportPath + ImportFile.Name; //Jerry
ImportData();
IF FILE.EXISTS(FileName) THEN
IF FILE.COPY(FileName,BackupPath + ImportFile.Name) THEN
Archived := TRUE;
IF Archived THEN
FILE.ERASE(FileName);
CLEAR(FileName);
CLEAR(Archived);
UNTIL ImportFile.NEXT =0;
but some time, some files can't be caught by these coding,I don't know why! Can you please share of some of your experience based on that? thanks !
0
Answers
for me %1 didnt work, I sorted like:
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/
In my experience, the File virtual table sometimes does not work on mapped / network drives.
I resorted to using the Dotnet.
e.g.
https://forum.mibuso.com/discussion/61335/read-client-files-in-folder