Options

Search files with a timestamp over system table

Martin_FörsterMartin_Förster Member Posts: 55
edited 2006-02-27 in Navision Financials
hallo,

i need some help!!!

i want to import multiples files like:

import_kunden_%timestamp%.csv

here my cal code:

timestamp := FORMAT(TODAY,0,'<Year4><Month,2><Day,2>');

datei_import := 'import_kunden_'+ timestamp+'*';

CLEAR(explorer);

explorer.SETRANGE(Path, "webshop einrichtung"."Pfad Import/Export");
explorer.SETRANGE("Is a file", TRUE);
explorer.SETFILTER(Name,'%1',datei_import);

but the code doesn't find anything!?!?!?

if i change the variable 'datei_import' with the string form a exiting file than it's OK!?!?!?

can anybody help me???

Comments

  • Options
    Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    Sometimes the filetable does not refresh. You can avoid this to change the filter on the folder with a '\' at the end of the filter.

    This is also explained somewhere else on this forum.
  • Options
    kinekine Member Posts: 12,562
    Please, try this:
    timestamp := FORMAT(TODAY,0,'<Year4><Month,2><Day,2>');
    
    datei_import := 'import_kunden_'+ timestamp;
    
    CLEAR(explorer);
    
    explorer.SETRANGE(Path, "webshop einrichtung"."Pfad Import/Export");
    explorer.SETRANGE("Is a file", TRUE);
    explorer.SETFILTER(Name,'%1*',datei_import);
    
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.