From: Andy on 5 Nov 2009 05:50 Hello, I am trying to filter all file in a folder having file name that starts with 2 character, for example CU. I use Record File No. 2000000022 and following code: SETRANGE(Path,'C:\TEMP\'); SETFILTER(Name,'=%1*','CU'); SETRANGE("Is a file",TRUE); IF FINDSET THEN FINDSET return always false also if in the folder there is a file called: CU20091104183810.txt. If I comment filter on Name FINDSET is true. Why this? How can I apply right filter? Thank you
From: Thomas Hütter on 5 Nov 2009 10:10 Hi Andy, try to filter like this: SETFILTER(Name, '%1', 'CU*'); and it should work. Regards, Thomas Andy schrieb: > Hello, > > I am trying to filter all file in a folder having file name that starts with > 2 character, for example CU. > > I use Record File No. 2000000022 and following code: > > > SETRANGE(Path,'C:\TEMP\'); > SETFILTER(Name,'=%1*','CU'); > SETRANGE("Is a file",TRUE); > IF FINDSET THEN > > > FINDSET return always false also if in the folder there is a file called: > CU20091104183810.txt. > > If I comment filter on Name FINDSET is true. Why this? > How can I apply right filter? > > Thank you
From: Spider on 7 Nov 2009 19:10 Hi Andy, It looks like the issue with the treating of the replacement fields (%1, %2, and so on). If you use: SETFILTER(Name,'=%1','CU*'); or SETFILTER(Name,'%1','CU*'); or SETFILTER(Name,'CU*'); it works as expected. Hope it helps. "Andy" wrote: > Hello, > > I am trying to filter all file in a folder having file name that starts with > 2 character, for example CU. > > I use Record File No. 2000000022 and following code: > > > SETRANGE(Path,'C:\TEMP\'); > SETFILTER(Name,'=%1*','CU'); > SETRANGE("Is a file",TRUE); > IF FINDSET THEN > > > FINDSET return always false also if in the folder there is a file called: > CU20091104183810.txt. > > If I comment filter on Name FINDSET is true. Why this? > How can I apply right filter? > > Thank you
|
Pages: 1 Prev: 23 Hosting Web www.ivys.es Next: Software Modification Form |