File lists
Andre Garzia
andre at andregarzia.com
Sun Jul 11 18:10:05 EDT 2010
Folks,
Bundles can have more extensions than just .app. Some bundles that I know:
.app
.bundle
.kext
.rtfd
.webarchive
All the iWork files are bundles (.pages, .key...)
Dashboard Widgets are bundles too...
I think the easiest way to detect bundles is to get the folders and treat
any folder with an extension as a bundle.
Cheers
andre
On Sun, Jul 11, 2010 at 6:34 PM, Richmond <richmondmathewson at gmail.com>wrote:
> On 07/11/2010 11:53 PM, J. Landman Gay wrote:
>
>> I need to get a list files in a folder and display it in a card field. The
>> function "the files" doesn't detect OS X "bundle"-type files such as rtfd
>> and Pages documents. Before I reinvent the wheel, does anyone have a script
>> for getting a full file list that includes these special OS X files?
>>
>> And secondly, since "answer file" does include bundle-type files,
>> shouldn't "the files" detect them too?
>>
>> Grumble.
>>
>>
> Set up 2 fields: "fFILES" and "fFOLDERS" and pop this into a button:
>
> on mouseUp
> put empty into fld "fFILES"
> put empty into fld "fFOLDERS"
> put the files into fld "fFILES"
> put return after fld "fFILES"
> put the folders into fld "fFOLDERS"
> put the number of lines of fld "fFOLDERS" into vFOLDERLINES
> repeat with vCOUNT = 1 to vFOLDERLINES
> put line vCOUNT of fld "fFOLDERS" into sFOLDER
> if sFOLDER contains ".app" then
> put sFOLDER after fld "fFILES"
> put return after fld "fFILES"
> end if
> end repeat
> end mouseUp
>
> fairly crude; but what else can you expect in 10 mniutes.
>
> If you want to say Thank you, you can explain
> why one cannot copy paste from the script editor on Linux
> into anything!!!!!
>
> _______________________________________________
> 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
>
--
http://www.andregarzia.com All We Do Is Code.
More information about the use-livecode
mailing list