title: Copying files from one directory to other in plsql
body: <p>I want to copy files from  one directory to other using "UTL" function.</p>
  
  <blockquote>
    <p>source directory = EXPORT_PPM_TEMP<br>
    target directory = EXPORT_PPM</p>
  </blockquote>
  
  <p>I am saving all files names in a collections and looping through the collections and copying to target directory.</p>
  
  <blockquote>
    <p>name of collection = vc_file_name.</p>
  </blockquote>
  
  <p>I am using below code to copy.                                                                        It is copying all files but some files are copying as empty files </p>
  
  <pre><code>FOR i IN 1 .. vc_index    
        LOOP  
    vc_lp_file_name := vc_file_name(i);
  
    Utl_File.Fcopy('EXPORT_PPM_TEMP',vc_lp_file_name,'EXPORT_PPM',vc_lp_file_name);
    Utl_File.Fremove('EXPORT_PPM_TEMP',vc_lp_file_name);
  
  END LOOP;
  </code></pre>
  
  <p>what is the reason behind coping some files with content and some without contents </p>