I have this alias I've created for testing purposes called UpUtils. Its purpose is to update several locations where I have my utilities directory stored - some on other computers, some on USB devices. (In the alias below, D, F and K are potentially USB drives, although any number of them might be connected to the computer at any given time.)
UpUtils=echo Q: %+ *copy /u /h /e /y /s C:\Utils Q:\Personal\MFerguson\Utils %+ echo D: %+ if %@ready[D:] == 1 if isdir D:\Utils *copy /u /h /e /y /s C:\Utils D:\Utils %+ echo F: %+ if %@ready[F:] == 1 if isdir
F:\Utils *copy /u /h /e /y /s C:\Utils F:\Utils %+ echo K: %+ if %@ready[K:] == 1 if isdir K:\Utils *copy /u /h /e /y /s C:\Utils K:\Utils %+ echo R: %+ if isdir R:\Utils *copy /u /h /e /y /s C:\Utils R:\Utils
I've added debugging stuff to the alias to help troubleshoot what's going on - I don't need the echo part of each command, nor would I expect to have to include the %@ready part, since I would think that isdir would cover it. But when I execute this alias, with a D: drive and a K: drive existing but no F:, I expect it to list Q:, then D:, the F:, then K: then R:. I only see Q:, D: and F:, and the actual file copy (copies) for F: doesn't even happen, and no K: or R:. It seems that when it hits the 'if isdir F:\Utils' statement, it terminates the alias completely. No error message or anything like that.
TCC 16.03.55 x64 Windows 7 [Version 6.1.7601]
TCC Build 55 Windows 7 Build 7601 Service Pack 1
UpUtils=echo Q: %+ *copy /u /h /e /y /s C:\Utils Q:\Personal\MFerguson\Utils %+ echo D: %+ if %@ready[D:] == 1 if isdir D:\Utils *copy /u /h /e /y /s C:\Utils D:\Utils %+ echo F: %+ if %@ready[F:] == 1 if isdir
F:\Utils *copy /u /h /e /y /s C:\Utils F:\Utils %+ echo K: %+ if %@ready[K:] == 1 if isdir K:\Utils *copy /u /h /e /y /s C:\Utils K:\Utils %+ echo R: %+ if isdir R:\Utils *copy /u /h /e /y /s C:\Utils R:\Utils
I've added debugging stuff to the alias to help troubleshoot what's going on - I don't need the echo part of each command, nor would I expect to have to include the %@ready part, since I would think that isdir would cover it. But when I execute this alias, with a D: drive and a K: drive existing but no F:, I expect it to list Q:, then D:, the F:, then K: then R:. I only see Q:, D: and F:, and the actual file copy (copies) for F: doesn't even happen, and no K: or R:. It seems that when it hits the 'if isdir F:\Utils' statement, it terminates the alias completely. No error message or anything like that.
TCC 16.03.55 x64 Windows 7 [Version 6.1.7601]
TCC Build 55 Windows 7 Build 7601 Service Pack 1