greycoin Posted November 22, 2011 Report Share Posted November 22, 2011 Hello all, thank you for taking the time to read. I am attempting to create a macro that will parse some information from an HTML file that is created in a temp directory by a program that I am running. Essentially one must type in a user's ID and this will generate a temporary HTML file with relevant information inside of it. Since a brand new HTML file (with a different file name) is generated each time a new user ID is entered, there's no way to actually just pull information from the same temp file. Is it possible to request that macro express open the most recently created file in a folder? Thanks Quote Link to comment Share on other sites More sharing options...
Cory Posted November 22, 2011 Report Share Posted November 22, 2011 There is no direct way I know of. I do this quite often and my technique is to repeat with folder and put the date/time of the file in a date/time variable. I cache the date/time and file name. on the first iteration and on each subsequent iteration compare. If greater I cache the new date/time and file name. When the loop is exited use the cached file name. Quote Link to comment Share on other sites More sharing options...
greycoin Posted November 22, 2011 Author Report Share Posted November 22, 2011 That's a really interesting way to go about it, and is certainly worth a try. But how do you ask macro express to cycle through the date of a file in a folder? Quote Link to comment Share on other sites More sharing options...
Cory Posted November 28, 2011 Report Share Posted November 28, 2011 First you use the Repeat With Folder command with the File option to put a file path\name in a variable and for each file you use the Variable Set From File command with the Get File Date/Time and To Date Var options. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.