Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Again with dir command
Message
De
12/03/2002 07:23:38
 
 
À
12/03/2002 07:18:15
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00631385
Message ID:
00631401
Vues:
34
THANK U CETIN
i'll try that tomorrow


>>Another problem with this command:
>>I need to retrieve informations about the date in which files where modified but i cannot get this information as i have to use jolly characters.
>>I cannot use as i did before the adir command because of the number of files stored in the directory a i have to scan.
>>Thank u again
>
>Alessio,
>Use filer utility. ie:
>
>
>oFiler = createobject('filer.fileutil')
>tcCursorName='crsFiles'
>Create cursor (tcCursorName) ;
>  (filepath c(100), filename c(50), filesize i, fattr i, created t, accessed t, modified t)
>With oFiler
>  .SearchPath = 'c:\myPath'
>  .Subfolder = 1 && Include subfolders
>  .SortBy = 1
>  .FileExpression = '*.*'
>  .Find(0)
>  For ix=1 to .Files.Count
>    With .Files(ix)
>      If !(bittest(.Attr,4) and .Name = '.')
>        Insert into (tcCursorName) ;
>          (filepath, filename, filesize, fattr, created, accessed, modified)  ;
>          values ;
>          (.Path, .Name, .Size, .Attr, ;
>          Num2Time(.DateTime), ;
>          Num2Time(.LastAccessTime), ;
>          Num2Time(.LastWriteTime))
>      Endif
>    Endwith
>  Endfor
>Endwith
>*-- Converts a time in numeric format to datetime
>Procedure Num2Time
>  Lparameters tnFloat
>  Return dtot({^1899/12/30}+int(tnFloat))+86400*(tnFloat-int(tnFloat))
>Endproc
>
Cetin
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform