Issues with folder scanning script
<p>I am trying to create a python script that will scan a folder. If it finds a file then it will run a command. After it has run the command it will remove the file and start over.</p>

<p>Below is a basic of what I have. I apologize I am quite new to scripting.</p>

<pre><code>def func():
    for file in folder:
         while True:
              if file:
                  os.popen(*command*)
                  time.sleep(750)
                  os.remove(*file path/file*)

              else:
                  time.sleep(5)
                  return func()
</code></pre>

<p>It starts off fine then breaks after it removes the file. Thanks for any help in advanced!</p>