title: Print out warning if found nothing using glob - TCL
body: <p>My script is as below. I would like to print out a warning if I cant glob any thing from the directory.</p>
  <p>How do I print a warning in the foreach loop when it cant find any file that match the $food and $toy combination?</p>
  <pre><code>foreach value $list {
  
  set file1 [ open &quot;$food/$toys/abc.txt&quot;]
  
  set list1 [glob -nocomplain -type f /a/$food/$toys/*]
  puts $file1 [join $list1 \n]
  
  close $file1
  
  }
  </code></pre>