Bug in "the folders"?
Jim Ault
JimAultWins at yahoo.com
Fri Mar 23 22:13:02 EDT 2007
A better way of deleting the unwanted is the one line
filter tDirList without ".*"
any file beginning with a period
no need to sort, or wonder which file is at the top
or how many "." files you have.
filter tDirList with " *" --isolate any beginning with spaces
Jim Ault
Las Vegas
On 3/23/07 4:31 PM, "Tariel Gogoberidze" <tariel at mac.com> wrote:
>
> On Mar 23, 2007, at 7:41 AM, Sivakatirswami wrote:
>
>> ... snip..
>
>> The following "old" directory walker I have use for "decades" from Ken
>> Ray.
>> Suddenly it is skipping any folders that start with a space.
>
>
>>
>> on directoryWalk gMainFolder
>>
>> set the itemDel to "/"
>> set the directory to gMainFolder
>> put the files into tFiles
>> put the files into temp
>>
>> put fld "ID" into tID
>> set the itemdel to "_"
>> repeat for each line x in temp
>> if item 1 of x = tID then put x & cr after tHits
>> end repeat
>>
>> sort temp
>> repeat for each line x in temp
>> if x is not empty then
>> put gMainFolder & "/" & x & cr after gHierList
>> end if
>> end repeat
>
>
>> put the folders into tDirList # any folder that begin with space
>> are not returned here.
>
>
> Interesting, because even if it would return folder with leading space
> here it would be deleted after next two lines.
>
>
>> sort tDirList
>> delete line 1 of tDirList
>
> delete line 1 of tDirList is here to delete ".." but if there is a
> folder with leading space it sorts before the ".." and gets deleted.
>
> So, may be you should try to toggle above two lines?
>
> best regards
> Tariel
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
More information about the use-livecode
mailing list