title: How to copy files from the one folder to another if flag is True in dictionary
body: <p>I have a dictionary having the bool values</p>
  
  <pre><code>test = {'db1': [{'url': 'http://localhost:8080/api', 'cmd': 'test\\nshow databases', 'flag': 'True'}], 
          'db2': [{'url': 'http://localhost:8080/api', 'cmd': 'test\\nshow databases', 'flag': 'False'}],
      'db3': [{'url': 'http://localhost:8080/api', 'cmd': 'test\\nshow databases', 'flag': 'True'}]}
  </code></pre>
  
  <p>there are 3 file inside the /home/ubuntu/ by name db1,db2,db3. </p>
  
  <p>If the flag is True we need to move from</p>
  
  <pre><code>/home/ubuntu/db1 to /home/ubuntu/test/db1
  /home/ubuntu/db3 to /home/ubuntu/test/db3
  </code></pre>
  
  <p>Normal way to copy using shutil, I have done . where to give flag condition</p>
  
  <pre><code>import shutil
  import os
  import glob
  setupname = glob.glob("test1/*")
  for root, dirs, files in os.walk("test1/"):
      for filename in files:
          print(filename)
          shutil.copy2(src, dest)
  </code></pre>