title: File Operations - Copy and Move - Delphi
body: <p>I need to do a two fold operation in Delphi.</p>
  
  <p>First is reading a directory and copy all of the files into a backup folder.  If any of the files are currently in use as being written to and/or open, then bypass that file.</p>
  
  <p>Second is to move the file to another directory.  Again, if any of the files are currently in use as being written to and/or open, then bypass that file.</p>
  
  <p>I have used file copy and move before, but I am unsure as to how to detect whether a file is being written to and/or open.</p>
  
  <p>Thanks.</p>