Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to work with files in system/hidden folders
Message
From
10/01/2000 11:17:11
 
 
To
09/01/2000 10:50:59
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00314887
Message ID:
00315514
Views:
61
>You just ran into the limit of available memory variables. Do you really need to usethis function on a directory that big? If so, you'll probably have to break it down so it runs in one piece at a time.

I was just trying out the code to see how it works. I guess that from my experiance if one was to use this code to create an explorer type interface that if you used ADIR() to popluate the tree of directories you should be safe.


>>Hi Ed,
>>
>>I was trying to run the example below on my computer and I got a "too many variables" error. I can't seem to understand how that is happening. I have a large hard drive with a lot of files...
>>
>>Thanks
>>
>>
* ADIR() method of recursively building the file list - Dave Frankenbach
>>ltStart = datetime()
>>
>>create cursor filesADIR ( cFilename c(80), nSize n(10), dMod d )
>>
>>RecurseFolder( "c:\" )
>>? datetime() - ltStart
>>
>>index on nSize tag nSize
>>
>>browse nowait
>>
>>function RecurseFolder( lcDir )
>>local i,n, laFiles[1]
>>
>>?? "."
>>n = adir( laFiles, lcDir + "*.*", "shd" )
>>
>>for i = 1 to n
>>   if ( left( laFiles[i,1], 1 ) != '.' )
>>      if ( "D" $ laFiles[i,5] )
>>         RecurseFolder( lcDir + laFiles[i,1] + "\" )
>>      else
>>        insert into filesADIR ;
>>               values( lcDir + laFiles[i,1], laFiles[i,2], laFiles[i,3] )
>>      endif
>>   endif
>>endfor
>>return
>>
>>
Previous
Reply
Map
View

Click here to load this message in the networking platform