Jump to content
Sign in to follow this  
OhMyGod

Placeholders in filenames ???

Recommended Posts

OhMyGod

I want to write a tool to observe the correct working of a tv-recording application.

It creates filnames like this:

07-09 19-55-52_SAT 1 Austria_Austria TopNews.mpg

What I would need is a match-funktion like this to find out whether the application records or not:

$filename= "E:\capture\" & @MON &  "-" & @MDAY & " " & @HOUR & "-" & @MIN & $placeholder & ".mpg"

If FileExists($filename) Then
    $size = FileGetSize($filename)
    MsgBox(4096,"Alert", "Active Recording detected:" & $size & "MB")
Else
    MsgBox(4096,"Alert", "NO active Recording found.")
EndIf

The problem here: I dont know the name of the show, therefore I would like to replace $placeholder by placeholders such as * or ? in Windows©.

But neither in the helpfile nor in the forumsearch I could find something like that.

Maybe there exists something like the following for filenames, but I couldn't find anything useful:

Opt("WinTitleMatchMode", 2) ; 2=Match any substring in the title.

Share this post


Link to post
Share on other sites
Jos

have a look at FileFindFirstFile ( "filename" ) in the helpfile. it should allow you to retrieve the filename from the directory...


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.