I have numerous files I am trying to move from a main directory in to separate directories which have multiple sub-directories inside.
Example file naming conventions 1SA_1BA_1W.out, 2SA_3BA_3W.out, 4SA_2BA_5W.out….
Is there a way given the number in from of each SA, BA, W or other items I have to move all at one time to a given location. The ranges of SA would be 1-10, BA 1-4 etc…
Currently I am using a script command such as……..
find . -type f -name '1A_1HNO3_*W.out' | xargs -I {} cp '{}' /location/SA_BA_W
find . -type f -name '2SA_*BA_*W.out' | xargs -I {} cp '{}' /location/SA_BA_W
find . -type f -name '3SA_*BA_*W.out' | xargs -I {} cp '{}' /location/SA_BA_W
find . -type f -name '4SA_*BA_*W.out' | xargs -I {} cp '{}' /location/SA_BA_W
find . -type f -name '1SA_*DEA_*W.out' | xargs -I {} cp '{}' /location/SA_DEA_W
find . -type f -name '2SA_*DEA_*W.out' | xargs -I {} cp '{}' /location/SA_DEA_W
find . -type f -name '3SA_*DEA_*W.out' | xargs -I {} cp '{}' /location/SA_DEA_W
find . -type f -name '4SA_*DEA_*W.out' | xargs -I {} cp '{}' /location/SA_DEA_W