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 ect... Currently I am using a script command such as........
find . -type f -name '1A_1HNO3_W.out' | xargs -I {} cp '{}' /location/A_HNO3
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
have over 1700 files with various identification abbreviations, such as SA BA A HNO3 W MA EAM TMA DMA DEA ect... I need to be able to get pull these files and transfer them into an easy database structure. The "location" would be the name of the main parent directory and folders like SA_DEA_W are sub directories inside the parent directory.