FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour help with adir test
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
help with adir test
Posted: Thu Jan 14, 2016 08:43 PM
I must found number of file have the header init with a code for sample

0014-test.pdf


my test
Code (fw): Select all Collapse
#include "fivewin.ch"
#include "constant.ch"

Function Test()
   Local oDlgTest
   Local nBottom   := 33
   Local nRight    := 75
   Local nWidth :=  Max( nRight * DLG_CHARPIX_W, 180 )
   Local nHeight := nBottom * DLG_CHARPIX_H
   local oBtnAllegati

   Local cRecord:="0014"
   local  cFolderAllegati:=".\doc\"
    local aAllegati := Array( ADir(cFolderAllegati+ "*.*" ) )
  local   nNumeroAllegati :=  Len( aAllegati )

   DEFINE DIALOG oDlgTest  ;
   TITLE "trying allegati"    ;
   SIZE nWidth, nHeight TRANSPARENT PIXEL



       @ 10,10 button  oBtnAllegati Prompt str(nNumeroAllegati)+"Allegati" size 100,12 of oDlgTest   action  NIL



     ACTIVATE DIALOG oDlgTest CENTERED

   return nil


it count all files on doc folder ( I wish only all initiating with 0014 header)
but on array aAllegati I not see any files

if I made xbrowser aAllegati it is empty
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com

Continue the discussion