How can I get a number from a file name and then copy files to that folder and execute .SQL files using PowerShell or cmd?
Basically users have a folder called SQL Update Scripts.
And each file we add has a number at the beginning and a description. Example File Name (688. VW tblUsers)
Now, not every user is up to the same numbered file so I want to copy from one folder containing all files to their folder only from the number they are up to and further on and only execute those.
So for example Development is up to file number 688 and the user's file number is up to 650 so I want to copy from development 651-688 and only execute all files within the folder starting at 651-688.