qzzyyx wrote:

> I'd like a button to open (ShellExecute) the most recently modified
> file in a folder (log files folder, current log file changes each
> month).  Help would be appreciated.  Thanks. 
>  - Vince

Another option would be to use CMD or TCC to create a file list.
Here it is, using JPSoft's free TakeCommand light

; script begin -- shellexecute first file of file list in reverse time order
file.runwait(1, ?!C:\TCCLE\tcc.exe!, ;;+
?!/c "set lst=%TEMP%\list.txt &dir /F /O:-d c:\target\*.png;*.jpg;*.gif;*.bmp 
>%lst%"!, ;;+
?!C:\TCCLE!, ?!hide!)
local file=file.readall(env("TEMP")++?"\list.txt").line(1)
do(file)
; script end

; slightly modified concept

; script begin -- run app.exe with file list in reverse time order
file.runwait(1, ?!C:\TCCLE\tcc.exe!, ;;+
?!/c "set lst=%TEMP%\list.txt &dir /F /O:-d c:\target\*.png;*.jpg;*.gif;*.bmp 
>%lst% &C:\apps\app.exe /list=%
lst%"!, ;;+
?!C:\TCCLE!, ?!hide!)
; possibly use START to run app.exe
; script end

Reply via email to