Working with Items

Categories:Common workflows

Deleting unused folders in the library

The following example recursively removes all empty folders from the library:

do{ collection = $$(':folder:empty').deleteItems() } while( collection.elements.length );

Organise your library by item type

The following example organises your library items into subfolders per item type under the root folder assets/, then deletes empty folders:

// move assets depending on type
    for each(var type in ['movieclip', 'bitmap', 'graphic', 'button', 'sound'])
        $$(':' + type).move('assets/' + type, false, true);

// delete empty folders
    do{collection = $$(':folder:empty').deleteItems();}
    while(collection.elements.length > 0);

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>