I am using a simple script to create some directories. Finding some specific files by name and then moving them into the directories that I have created. The code that I am using is below:
mkdir ./3DBGB_run
mkdir ./run_optimization
mkdir ./run_optimization/project_mesh
mkdir ./run_optimization/CFD_optimized
find . -name '*.template' -exec mv -i {} ./3DBGB_run \;
find . -name '3dbgbinput.*.dat' -exec mv -i {} ./3DBGB_run \;
find . -name 'controlinputs.*.dat' -exec mv -i {} ./3DBGB_run \;
find . -name '*.iec' -exec mv -i {} ./run_optimization/project_mesh \;
find . -name '*.trb' -exec mv -i {} ./run_optimization/project_mesh \;
find . -name '*.py' -exec mv -i {} ./run_optimization \;**
Code runs and moves the files to the desired directories but then it also display an error message for each file that "cannot move file because it is the same file"