Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ADIR and ASORT for .NET ?
Message
From
03/06/2005 19:25:27
 
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01020162
Message ID:
01020165
Views:
27
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?
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform