Jump to content
Macro Express Forums

Using "if File Exists" Command W/ A Wildcard.


Markter

Recommended Posts

I have a macro that i use the "if file exists" command with a wildcard in the file name. I just came upon the documentation that states this command does not support wildcards. I don't seem to have had any problems running this macro, but i think i want to change it anyway. How can i have the macro check for a file with a wildcard and continue on. I have tried "wait for File Exist" but i don't want to wait. If it is not there then i want the macro to move on. Any suggestions?

Thanks

Mark

Link to comment
Share on other sites

Technically, it doesn't support wildcards. However, since we used Delphi to create the program, there's a little "flaw" that will allow you to use a wildcard in the If File Exists command. When checking for the existance of a file, Delphi uses an API that accepts wildcards. That's why it appears to work in Macro 3.

 

That said, I can't guarantee that this will be workable in any future version of Macro Express. It depends entirely upon whether or not the Delphi framework uses a different API to test for the existence of a file.

Link to comment
Share on other sites

Hi,

[*** This only works, of course, if Wilcards work with your planned "wait file exists" anyway?... do they?]

1. Is this the sort of thing you are asking? It allows you to set a time to wait in the "Text Box Display: timer"

Text Box Display: timer

Delay 100 Milliseconds

Wait for File Exist: "macex.000"

  OR

Wait Window Lose Focus: "timer"

If File Exists "macex.000"

  Window Close: "timer"

  Text Box Display:

End If

2. can someone remind me of a more elegant way to time out please; I know I've seen it somewhere.

Best, Randall

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...