So, the user enters a customer ID like "A123" and this loop finds the full path. These folders are usually named something like "A123 Acme Industries" but when the user is doing the entry, it's much easier to enter only those first 4 characters.
Code: Select all
Loop, Q:\QA ORDERS\%CustID%*.*,2
{
JobDirCheck := A_LoopFileLongPath . "\" . JobNum ; set variable for job directory
}
That is, an exact match for those first 4 characters.
If an exact match isn't found, I'd like to stop the script so that the user can double-check the ID and try again.
Thanks!