I designed a slider things i can hide if is check a cheque box.

I even gave it a port where one can add the folder locaton, however i cant reach hide when the folder is empty or it is not correct

this is actually the code

<?php if(is_category(7) || is_page(11) && get_post_meta($post->ID, 'm_slider', true) == 'true' || 11 == $post->post_parent && get_post_meta($post->ID, 'm_slider', true) == 'true') {?>
<div id='slider_bg'>
</div><!-- slider_bg -->
<div id='slider_img'>
<div class="slider" >
<img src='<?php bloginfo('template_url'); ?>/slider/<?php echo get_post_meta($post->ID, 'main_folder', true); ?>/1.jpg'>
<img src='<?php bloginfo('template_url'); ?>/slider/<?php echo get_post_meta($post->ID, 'main_folder', true); ?>/2.jpg'>
<img src='<?php bloginfo('template_url'); ?>/slider/<?php echo get_post_meta($post->ID, 'main_folder', true); ?>/3.jpg'>
<img src='<?php bloginfo('template_url'); ?>/slider/<?php echo get_post_meta($post->ID, 'main_folder', true); ?>/4.jpg'>

</div>
</div>
<?php } ?> 

i tryed allow it to some variable and when its empty than hide it no longer working i tryed wit if(get_publish_meta($publish->ID, 'main_folder', true) !== '')

which does not work either, could please someone produce an indication what im missin?

You could attempt :

$themeRoot = get_theme_root();
$meta = get_post_meta($post->ID, 'main_folder', true);
if ( !empty($meta) && is_dir($themeRoot . '/slider/' . $meta) )
{
    # test here if the folder is empty or not and act acordingly 
    #  http://iarematt.com/php-code-to-check-if-a-directory-is-empty/
}