title: Move the entire folder into new directory if it contains a file
body: <p>I have a directory</p>
  
  <p>test2 with following contents :</p>
  
  <pre><code>file1
    test.pdb
    xyz.txt
    1.txt
  
  file2
    test.pdb
    xyz.txt
  
  file3
    test.pdb
    xyz.txt 
    1.txt
  </code></pre>
  
  <p>I want to move the folder(here, file 1 and file 3) which contain 1.txt to a new directory named 'complete'.How to do it?</p>
  
  <p>Desired output : </p>
  
  <p>complete </p>
  
  <pre><code>file1
    test.pdb
    xyz.txt
    1.txt
  
  file3
    test.pdb
    xyz.txt 
    1.txt
  </code></pre>
  
  <p>test2</p>
  
  <pre><code>file2
    test.pdb
    xyz.txt
  </code></pre>
  
  <p>Code till now :</p>
  
  <pre><code>find . -maxdepth 2 -name "*ionized.pdb" -print| sed "s|^\./||"
  </code></pre>