recursion limit when creating file list of harddrive

Alex Tweedly alex at tweedly.net
Sat Oct 24 20:33:01 EDT 2015


Are you sure you are actually hitting a recursion limit ?

Another (perhaps more likely) problem is that you are hitting a 
protected directory, or one which you cannot access (e.g. because of 
strange character in name).

I would (at a minimum) put in a check that you have moved to the folder:

on directoryWalk whatFolder
   --put whatFolder
   --exit to top
   set the itemDel to "/"
   set the directory to whatFolder
   if the directory <> whatFolder then
      -- give some error somewhere
      exit directoryWalk
   end if
   put the files into temp

If that's not it, then you need to change to a serialized rather than a 
recursive treewalk - I'm sure that's been posted on the use-list some 
time ago (if you can't find it, let me know and I'll dig one up)

-- Alex.

On 25/10/2015 00:28, Matthias Rebbe | M-R-D wrote:
> Hi,
>
> long time ago i created a program which creates a list of files of  backup cds or dvds and stores that listings in a database with some additional information like cd name/number.
> So if the customer needs to know on which cd/dvd a needed fileis,  the database can be searched. This worked fine a long time. But with time the customer used harddrives for the backups.
> So they imported now the file listing of harddrives. Even that worked fin. But now with bigger drives and more stuff stored on the drives my program is not able to import the file listing anymore if the number of files/folders exceed a special number. It just freezes.
>
> If i try to create a directory listing of such a drive in Livecode i get an recursion limit error telling me that the recursion limit of 400000 was reached. I tried to increase that limit, but i still get that error, but with the newly set value.
>
> I am using a script snippet which was posted by Scott Rossi to the list and was originally from Geoff Canyon in 2002.
> http://lists.runrev.com/pipermail/metacard/2002-August/002274.html
>
> Is there a way to scan a complete drive with LC regardless how many folders and subfolder that drive contains without getting that recursion limit error?
>
> Regards,
>
> Matthias
>
>
>
>
> Matthias Rebbe
> Bramkampsieke 13
> 32312 Lübbecke
> Tel	+49 5741 310000
>      	+49 160 5504462
> Fax: +49 5741 310002
> eMail: matthias at m-r-d.de <mailto:matthias at m-r-d.de>
>
> BR5 Konverter - BR5 -> MP3 <http://matthiasrebbe.eu/portfolio/produkte/brx/>
>
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the use-livecode mailing list