I'm working with HPC and am trying to run a python script that reads and modify every tif files in a folder and its subfolders. Right now I'm running a for loop:
files = glob.glob("./Examples/**/*.tif", recursive = True)
for file in files:
But it doesn't modify every file in the subfolder, only the final one. I run the exact same script locally and it worked just fine. So I'm thinking it's something to do with SLURM sitting on top of the code and maybe controlling how and when outputs get written. So could there be a way to write a python/slurm script that looks at the files in the directory and calls a slurm script, passing it a file name? Or any other solutions are also welcomed.
Thanks.