It seems that if I am using a question mark "?" as a wildcard in the file pattern of a "files & folders" loop, it does not match a dot ".".
Example: C:\Temp\1a.00.txt
this does not work:
Loop, Files, C:\Temp\?????.txt, F
this works:
Loop, Files, C:\Temp\??.??.txt, F
Version: 1.1.28.00
Loop (files & folders) - question mark as wildcard
Re: Loop (files & folders) - question mark as wildcard
AutoHotkey does not do pattern matching of filenames; it is handled by the OS. This is standard Windows behaviour.
You may also find that ??????.txt (six question marks) matches, because the file's short name is something like 1A00~1.TXT.
(But I haven't found any official documentation to substantiate this.)Your understanding of the ? is wrong. It does not match simply any single character. Rather it matches any character except .. If there is no character to match (at end of name, or before a .), then ? will match "nothing" without failure.
Source: batch: question mark wildcard not working with dots - Stack Overflow
You may also find that ??????.txt (six question marks) matches, because the file's short name is something like 1A00~1.TXT.
Who is online
Users browsing this forum: No registered users and 61 guests