Move file to archive directory

Dear,

Is it possible to move a file after it has been read by a datareader to an archive folder.

Is there a command that can be used in procedure to execute a copy command etc.

Thank you

Answers

  • Jui Date
    Jui Date Employee
    Fourth Anniversary 10 Comments First Answer Level 100: Foundations of Building in Board

    Hi Khaleelah,

    There is no command available in procedure to move a file to archive folder once it is read. There are ways to archive the file read outside BOARD.

    Regards, Jui

  • Khaleelah
    Khaleelah Customer
    10 Comments Name Dropper Level 200: Building A Planning Solution in Board

    what if i use a server command executing a .bat file which is placed in a directory somewhere on azure

  • Hi Khaleelah,

    Is your Board instance on the Cloud or On-Prem? The server command step is only available to instances on-prem (see details here : https://help.board.com/v14/docs/execution-flow-action-group#server-command). ). The .bat file you wish to invoke from Board must be located in the “…\Board\Job” directory. There's a few other requirements/things to note that are explained further in detail on the Board Manual section I've linked to which I'd recommend reviewing before testing the above out.

    Let me know if you have any questions!

  • Khaleelah
    Khaleelah Customer
    10 Comments Name Dropper Level 200: Building A Planning Solution in Board

    Thanks.

    Instance is on cloud.

  • Hi Khaleelah,

    Understood - in that case, unfortunately the server command step won't be applicable. If the files that need to be archived/moved are on Azure Shared Storage (such as the Z:/ drive), you may be able to utilize AZCopy in a script in order to move the files around on a scheduled basis. Further documentation provided by Microsoft pertaining to AZCopy including examples of the different operations available can be found here :

    https://learn.microsoft.com/en-us/azure/storage/common/storage-use-azcopy-v10?tabs=dnf

    There's also a How to Guide on using the Board Cloud Shared Storage posted on the Community which may be helpful to reference :

  • Khaleelah
    Khaleelah Customer
    10 Comments Name Dropper Level 200: Building A Planning Solution in Board

    And this is done outside board right? the script etc

  • Helmut Heimann
    Helmut Heimann Employee, Community Captain
    50 Answers 500 Comments 250 Likes Fourth Anniversary

    yes, in cloud instances that would be "outside" of Board. Any overhead you'd need to see whether something's been changed and needs to be archived/deleted has to be done in scripts on azure.

  • Considering the cloud environment, I can think of 2 possible ways

    1. Triggering everything from outside Board
      1. Setup a PowerShell script to call first trigger the Bord Procedure using Board API
      2. In the same script call the Azure commands to move the file to the desired location
    2. Triggering from within Board
      1. Make use of Power Automate to define the steps of moving file
      2. Use Board to call the data reader and then use REST API step to call the Power Automate API to execute the Automation