| View previous topic :: View next topic |
| Author |
Message |
degarb
Joined: 14 Feb 2007 Posts: 307
|
Posted: Wed Nov 18, 2009 6:17 pm Post subject: complex file pattern on loop |
|
|
I want to loop *.avi and *.vob
Do I need to do two loops (time consuming), or can I just pipe it? |
|
| Back to top |
|
 |
SKAN
Joined: 26 Dec 2005 Posts: 8688
|
Posted: Wed Nov 18, 2009 6:25 pm Post subject: |
|
|
I am not sure, but I think two files loops will be faster than
| Code: | Loop *.*
{
If A_LoopFileExt not in avi,vob
continue
; Rest of the code
} |
|
|
| Back to top |
|
 |
bpmb
Joined: 13 Sep 2009 Posts: 30
|
Posted: Wed Nov 18, 2009 6:49 pm Post subject: |
|
|
Here's how I do it:
| Code: | Loop, *.*, , 1
{
if (A_LoopFileExt = "avi" or A_LoopFileExt = "mpg" or A_LoopFileExt = "mkv" or A_LoopFileExt = "mp4" or A_LoopFileExt = "dv" or A_LoopFileExt = "mov" or A_LoopFileExt = "wmv" or A_LoopFileExt = "ts")
{
Rest of code
} |
Thank 'Guest' for that one, I also had 8 loops running 1 after another, this should get you what you want..? |
|
| Back to top |
|
 |
jaco0646
Joined: 07 Oct 2006 Posts: 3113 Location: MN, USA
|
Posted: Wed Nov 18, 2009 7:38 pm Post subject: |
|
|
| Code: | exts = avi|mpg|mkv|mp4|dv|mov|wmv|ts
Loop, Parse, exts, |
Loop, *.%A_LoopField% |
|
|
| Back to top |
|
 |
bpmb
Joined: 13 Sep 2009 Posts: 30
|
Posted: Wed Nov 18, 2009 7:41 pm Post subject: |
|
|
| Wow, nice one, changed mine as well! |
|
| Back to top |
|
 |
|