uses param d for folders and v for videos only, although it accepts dirs too