nesi / APSIM-HPC

Deploy APSIM (Agricultural Production Systems sIMulator - https://www.apsim.info/) on high performance computing clusters.
MIT License
0 stars 0 forks source link

*.db size sorter - Split *.db files to PASSED and FAILED based on file size ( current threshold is <1MB failed) #29

Closed DininduSenanayake closed 2 weeks ago

DininduSenanayake commented 2 weeks ago

db-file-sort.py does the following

  1. It sets up the source directory and creates PASSED and FAILED directories if they don't exist.
  2. It defines the size threshold as 20MB (converted to bytes).
  3. terates through all files in the source directory.
  4. For each .db file, it checks the file size:

    • If the size is greater than 20MB, it moves the file to the PASSED directory.
    • If the size is less than or equal to 20MB, it moves the file to the FAILED directory.
  5. It prints a message for each file moved and a completion message at the end.