Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ADIR and ASORT for .NET ?
Message
 
À
03/06/2005 19:25:27
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01020162
Message ID:
01020542
Vues:
26
Bonnie,

Thanks. Looks like the asort functionality there works with one-dimentional array only though. So it cannot help me anyway. Or I am missing something?


>Yuri,
>
>You don't need to install the VFP ToolKit for .NET ... you can just use the code to create your own methods. Look at the Help and just use the same code that is shown in the Implementation section for each VFP function that you need to emulate.
>
>~~Bonnie
>
>
>
>>I need to scan several directories containing about 10000 files each and for files created, say, more than 2 weeks ago during the day hours prior to the current time. There could be about 100 files that should be erased. With VFP ADIR() it is quite easy to do:
>>
>>If  adir(atmp,”*.*”)>0
>>     =asort(atmp,3)
>>     ia=1
>>     do while atmp[ia,3]<date()-14
>>       if additional_timecondition
>>          erase (atmp[ia,1])
>>       endif
>>
>>      ia=ia+1
>>
>>   enddo
>>endif
>>
>>
>>And it takes about 1-5 seconds.
>>
>>But I cannot figure out how to do it wisely in VB.NET: the collection object like Scripting.FileSystemObject does not give the ability to sort. Therefore it requires scanning all the files, and checking the date of each of them. It takes about 2-3 minutes per directory.
>>
>>Adding the VFP Toolkit for .NET requires additional installation on the PC, and it is not allowed at the time.
>>
>>Has anyone a suitable solution?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform