title: copy database file from MyDocuments
body: <p>i have a sample code to copy a file from one location to another. am using that as a backup for an SQLite database file which copies the file from My Documents folder to the desktop.. the sample code is below: <br/></p>
  
  <pre><code>try{
              DateTimeFormatter date = DateTimeFormatter.ofPattern("yyyy/MM/dd HHmmss");
              String sys =System.getProperty("user.home");
              String fileurl = sys+"\\Desktop\\school database backup";
              File dest = new File(fileurl+date.format(java.time.LocalDateTime.now()));dest.mkdir();
  
  
              String sys1 =System.getProperty("user.home");
              File source = new File(sys1+"\\Documents\\hyper-DB\\intellect");
  
              FileUtils.copyDirectory(source, dest);
              JOptionPane.showMessageDialog(null,"Backup Successful");
          }
          catch(IOException e){
              e.getMessage();
          } finally{
              try{
                  rs.close();
                  pst.close();
              }
              catch(Exception e){
              }
  
          }
  </code></pre>
  
  <p>this code works perfectly on my my pc which I used to create the project. but when I install it on another user's pc. it doesn't work. and am sure its unable to locate the database in My Documents folder though its there. please what do I do to make it work on another pc. thank you </p>