Transfer processed files to a folder

Hi,

I have a custom flow which fetches files from a folder A in an FTP server. This file is processed to created Purchase orders in NetSuite. On successful import, I need the file to be moved to a folder B. I have tried the “Backup files path”, but it will move the file regardless of the import being success or failure. I need to move the file only fi the import is success. Please suggest a feasible solution to achieve this.

Thanks

  1. Flow 1
    1. Grabs the file and backs the file up to an in progress directory
    2. Imports the POs to NetSuite
    3. On flow settings, specify flow 2 to run after this flow is done
  2. Flow 2
    1. Checks the status of the last job for that flow using the jobs api
    2. Do a lookup to lookup files in the in process directory (set parse files to false)
    3. Result map the blob keys to your data
    4. Last import step transfers those files back to the original directory or to a failed one