I have a task to write a PS script in order to sort and copy files into specific folders based on their name.
Files are named following convention of:
DNK - FB - YouSee - S -AFC - R- S-Default-2017-10-05.csv
NOR - FB - YouSee - S -AFC - R- S-Default-2017-10-05.csv
Meaning behind the parts of the file name:
<Country>-<Service>-<Company> - rest does not really matter.
Folders however follow structure of:
What's the best way to sort and place the files in respective folders based on the first three parts of the name (Country-Service-Company?
Any help/suggestions appreciated.