Posted to tcl by iobates at Sun Sep 20 14:47:51 GMT 2026view pretty

proc list-files-recur {path} {
    set books {}
    foreach fil [glob -dir $path *] {
	if {[file isdir $fil]} {
	    list-files-recur $fil
	} else {
	    lappend books $fil
	}
    }
    puts $books
    return $books
}

proc insert-calibre {path} {
    foreach f [list-files-recur $path] {
	 exec calibredb add $f
    }
}