title: Write trigger file once all files have been moved to unix
body: <p>I would like to move all the files to unix and once all the files have been moved, write a trigger file to unix.
  Below is the code:-</p>
  
  <pre><code>  public static void download(CloudFileDirectory root, 
    CloudFileDirectory backup) throws StorageException, URISyntaxException, 
    FileNotFoundException {
  
      ResultSegment&lt;ListFileItem&gt; list = 
    root.listFilesAndDirectoriesSegmented();
      for (ListFileItem item : list.getResults()) {
          URI uri = item.getUri();
          String path = uri.getPath();
          String localPath = localRootDirPath;
          String itemName = new File(path).getName();
  
              CloudFile file = root.getFileReference(itemName);
              file.download(new FileOutputStream(localRootDirPath+itemName));
              CloudFile backupFile = backup.getFileReference(itemName);
              backupFile.startCopy(file);
              file.delete();
  
              file.download(new 
       FileOutputStream(localRootDirPath+"ok_business"));
          }
       }
  </code></pre>
  
  <p>Problem above is that, it creates a trigger file 'ok_business' after the first file is move to unix but I want to create only once all the files have been moved.</p>