title: Move files to another GCS folder and perform actions after an apache beam pipeline has been executed
body: <p>I created a streaming apache beam pipeline that read files from GCS folders and insert them in BigQuery, it works perfectly but it re-process all the files when i stop and run the job,so all the data will be replicated again.</p>
  
  <p>So my idea is to move files from the scanned directory to another one but i don't how technically do it with apache beam.</p>
  
  <p>Thank you</p>
  
  <pre><code>
  public static PipelineResult run(Options options) {
  // Create the pipeline.
  
          Pipeline pipeline = Pipeline.create(options);
  
          /*
           * Steps:
           *  1) Read from the text source.
           *  2) Write each text record to Pub/Sub
           */
  
          LOG.info("Running pipeline");
          LOG.info("Input : " + options.getInputFilePattern());
          LOG.info("Output : " + options.getOutputTopic());
  
          PCollection&lt;String&gt; collection = pipeline
                  .apply("Read Text Data", TextIO.read()
                          .from(options.getInputFilePattern())
                          .watchForNewFiles(Duration.standardSeconds(60), Watch.Growth.&lt;String&gt;never()))
  
                  .apply("Write logs", ParDo.of(new DoFn&lt;String, String&gt;() {
                      @ProcessElement
                      public void processElement(ProcessContext c) throws Exception {
                          LOG.info(c.element());
                          c.output(c.element());
                      }
                  }));
  
          collection.apply("Write to PubSub", PubsubIO.writeStrings().to(options.getOutputTopic()));
  
          return pipeline.run();
      }
  
  </code></pre>