xcaliber13 Posted June 10, 2015 Posted June 10, 2015 How would I open any html file that is in a folder. The folder would have only one html file but the file name will be different every time. Here is what I am using but it does not like the wildcard.#include <ie.au3> $sFile = "C:/temp/*.html $sURL = "file:///" & $sFile _IECreate($sURL)How do you get it to open any html file?Thank you
Moderators JLogan3o13 Posted June 10, 2015 Moderators Posted June 10, 2015 (edited) Hi, xcaliber13. Look at _FileListToArray in the help file. Read the contents of the folder into your array to get the filename, then use that in your script.Edit: something like this to get you started#include <File.au3> $aTemp = _FileListToArray(@DesktopDir & "\Test", "*.htm", $FLTA_FILES) If IsArray($aTemp) Then If $aTemp[0] > 1 Then ConsoleWrite("More than one HTML file found!" & @CRLF) Else ConsoleWrite($aTemp[1] & " found." & @CRLF) EndIf EndIf Edited June 10, 2015 by JLogan3o13 layan232 1 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now