Wildcard in Loop, Files

Get help with using AutoHotkey and its commands and hotkeys
Posts: 201
Joined: 17 Mar 2017, 22:06

Wildcard in Loop, Files

30 Aug 2018, 13:46


I'm trying to open a file that is generated every 2 weeks. The path changes each time, stored in a folder named by current time down to seconds. I was hoping to use wildcards to get this, but it appears wildcard only works at the end for filename.extention

The last folder name format was created as this: C:\BANANA\ORANGE\APPLE\2018-08-30_19-20-32-PM

This doesn't work

Code: Select all

Loop,Files, C:\BANANA\ORANGE\APPLE\%A_YYYY%-%A_MM%-%A_DD%*\*.xlsx ;
	Run, %A_LoopFileFullPath%
This does

Code: Select all

Loop,Files,C:\BANANA\ORANGE\APPLE\2018-08-30_19-20-32-PM\*.xlsx ; 
	Run, %A_LoopFileFullPath%

Any help on this is appreciated! :)
User avatar
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: Wildcard in Loop, Files

30 Aug 2018, 14:04

- IIRC wildcards can only be used in the name part of the file pattern.
- So you would probably need 2 file loops. One to get the dir, and then one to loop through it.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], djuga and 48 guests