Delete Blank Drafts

Posted by agiletortoise, Last update over 2 years ago

Find all blank drafts and move them to the trash.


  • script

    // fint blank drafts and move them to trash
    const re = /^.{0}$/;
    let drafts = Draft.query("/^.{0}$/", "all");	
    let p = new Prompt();
    p.title = "Delete Blank Drafts";
    p.message = `${drafts.length} blank draft(s) found.
    Move blank drafts to the trash?`;
    p.addButton("Move to Trash");
    if ( {
    	for (let d of drafts) {
    		d.isTrashed = true;
    	alert("Blank drafts moved to trash");


  • After Success Default
    Notification Info
    Log Level Info
Items available in the Drafts Directory are uploaded by community members. Use appropriate caution reviewing downloaded items before use.