extract_date_from_filename.hidcont <- function(f) {
  b <- basename(unlist(f))
  dates <- removeText("(ioda|iris|orchard|itunes|\\s|_)*hidden(\\s|_)*music(\\s|_)*_?", b, ignore.case=TRUE) %>% 
            removeExt %>% 
            removeText("_(ORCH|IODA|IRIS)$", .) %>% 
            unname

  as.Date(dates, format=ifelse(grepl("\\.", dates), "%m.%d.%y", "%Y%m%d"))
}


content_owner_from_filename <- function(f) {
    f %>% 
    unlist %>% 
    dirname %>% 
    removeText("/20\\d\\d(\\d|_|/)+$", .) %>% 
    basename
}

