Re: recursion limit when creating file list of harddrive

2015-10-30 Thread Peter M. Brigham
Here is a version that puts the trailing "/" on folders and adjusts the input parameters for the function. -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig -- function directoryListing pWhatFolder, pInvisibleFiles, pDepth -- returns a full listing of

Re: recursion limit when creating file list of harddrive

2015-10-30 Thread JB
When I set the depth to 1 all I would get is the pWhatFolder but 2 would list the files at level 1. JB > On Oct 30, 2015, at 5:57 AM, Peter M. Brigham wrote: > > Here is a version that puts the trailing "/" on folders and adjusts the input > parameters for the function. >

Re: recursion limit when creating file list of harddrive

2015-10-29 Thread Geoff Canyon
"there is a folder" and "there is a file" can distinguish between the two. Obviously if you want to distinguish visually for the user, or to do it without testing, then including the trailing "/" would work. On Wed, Oct 28, 2015 at 1:51 PM, Michael Doub wrote: > When I saw

Re: recursion limit when creating file list of harddrive

2015-10-28 Thread Geoff Canyon
For me it made more sense to change the exit value to 1. That way the value is the number of layers you want *including* the directory you specify. So: put directoryListing("/Users/gcanyon/Desktop",1) -- puts /Users/gcanyon/Desktop That way using either 0 or empty gets the infinite list. The

Re: recursion limit when creating file list of harddrive

2015-10-28 Thread Geoff Canyon
Sounds like just the fact that you don't have the scrollbar I used to experiment with the depth. The mouseUp code is just for testing -- the function is self-contained. gc On Tue, Oct 27, 2015 at 4:32 PM, JB wrote: > I was not able to get the mouseUp handler to > work but

Re: recursion limit when creating file list of harddrive

2015-10-28 Thread JB
Thank you for the info. JB > On Oct 28, 2015, at 7:46 AM, Geoff Canyon wrote: > > Sounds like just the fact that you don't have the scrollbar I used to > experiment with the depth. The mouseUp code is just for testing -- the > function is self-contained. > > gc > > On

Re: recursion limit when creating file list of harddrive

2015-10-28 Thread Michael Doub
When I saw that the output contained both directories and files, adding the "/" allows you to easily know that you are looking at a folder rather than a file. put directoryListing(whatfolder) into foo repeat for each line x of foo if char -1 of x = "/" then put x & cr after directoryList

Re: recursion limit when creating file list of harddrive

2015-10-28 Thread JB
Here is a different mouseUp handler you can put in a field. on mouseUp if target = empty then answer folder "Pick a folder you want to walk:" put it into whatFolder set cursor to watch put directoryListing(whatFolder,2) into target exit to top end if if the

Re: recursion limit when creating file list of harddrive

2015-10-28 Thread JB
I improved the mouseUp handler. Now you can set the desired level at the top of the handler and you can launch applications and folders in the finder. on mouseUp put 1 into cNum if target = empty then answer folder "Pick a folder you want to walk:" put it into whatFolder

Re: recursion limit when creating file list of harddrive

2015-10-27 Thread Geoff Canyon
Revised. Now in function form, with error checking and depth control. You can hand in a positive number to get that number of layers deep, or a negative number to go all the way down. I tested it on my home directory and it came back fine (after some time). I haven't (knowingly) tested with

Re: recursion limit when creating file list of harddrive

2015-10-27 Thread JB
Thank you, Geoff JB > On Oct 27, 2015, at 9:18 AM, Geoff Canyon wrote: > > Revised. Now in function form, with error checking and depth control. You > can hand in a positive number to get that number of layers deep, or a > negative number to go all the way down. I tested it

Re: recursion limit when creating file list of harddrive

2015-10-27 Thread Michael Doub
Geoff, I would suggest replacing the first statement of the function with if c is empty then put -1 into c-- set the default to go all the way down put whatFolder & "/" & cr into R -- add a "/" to directory output so they are more easily parsed later -= Mike On 10/27/15 12:18 PM,

Re: recursion limit when creating file list of harddrive

2015-10-27 Thread JB
I was not able to get the mouseUp handler to work but I got the function to return a list but it probably not the same list. I used this. on mouseUp answer folder "Pick a folder you want to walk:" put it into whatFolder --put directoryListing(fld "directory",round(the thumbposition of

Re: recursion limit when creating file list of harddrive

2015-10-27 Thread JB
If you have already put a directory listing in a field and want to click a line to get the list of that line you can put this code in the field. on mouseUp put word 2 of the clickline into tLine put line tLine of target into whatFolder put directoryListing(whatFolder,2) --into fld id

Re: recursion limit when creating file list of harddrive

2015-10-25 Thread JB
I have been testing it out and it is working good so far. I set the cursor to watch after selecting. I am not sure if setting it to busy in a repeat will take too much time on large operations. Is there and easy way to have it only list the folder paths? JB > On Oct 25, 2015, at 3:39 PM, Alex

Re: recursion limit when creating file list of harddrive

2015-10-25 Thread Geoff Canyon
On Sat, Oct 24, 2015 at 7:28 PM, Matthias Rebbe | M-R-D < matthias_livecode_150...@m-r-d.de> wrote: > 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 >

Re: recursion limit when creating file list of harddrive

2015-10-25 Thread Alex Tweedly
Well, it's a sad comment on my filing system, but it was easier to rewrite this handler from scratch (and memory) than it was to find the original :-) Note this is done as a handler rather than a function, because it has 3 return values - a list of files, a list of folders, and a list of any

Re: recursion limit when creating file list of harddrive

2015-10-25 Thread JB
THANK YOU VERY MUCH, Alex. JB > On Oct 25, 2015, at 3:39 PM, Alex Tweedly wrote: > > Well, it's a sad comment on my filing system, but it was easier to rewrite > this handler from scratch (and memory) than it was to find the original :-) > > Note this is done as a handler

Re: recursion limit when creating file list of harddrive

2015-10-25 Thread Matthias Rebbe | M-R-D
Thanks for all your comments. Richard was right, my recursion limit error was caused by the fact that the directory could not be set. It was, like Alex assumed, a strange character in a folder. After i changed that folder name in my “sample” harddrive i was able to import the drive. In

Re: recursion limit when creating file list of harddrive

2015-10-25 Thread JB
Okay - Thank you very much again! JB > On Oct 25, 2015, at 6:09 PM, Alex Tweedly wrote: > > I'm not sure about cursor setting - you might put in a counter, and set it to > busy every 1000 (or 10,000) times through loop. > > What if we want only folder paths ? > > I did

Re: recursion limit when creating file list of harddrive

2015-10-24 Thread Richard Gaskin
Matthias Rebbe wrote: 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

recursion limit when creating file list of harddrive

2015-10-24 Thread Matthias Rebbe | M-R-D
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

Re: recursion limit when creating file list of harddrive

2015-10-24 Thread Alex Tweedly
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:

Re: recursion limit when creating file list of harddrive

2015-10-24 Thread JB
> On Oct 24, 2015, at 5:33 PM, Alex Tweedly wrote: > > > 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) > >