yton Posted April 30, 2010 Posted April 30, 2010 Greetings,say, i have a folder where my script isi want to add a word doc file there and open it by means of autoitthe thing is that i do not want to stick to file namecan i open it sticking to file extension or smth else?thank you
hawky358 Posted April 30, 2010 Posted April 30, 2010 (edited) If you are always only going to have that one file in the folder you can use this $doc = FileFindFirstFile("*.doc") $doc = FileFindNextFile($doc) ShellExecute($doc) alternatively if you put the .doc in a folder use can use it like this: $thefolder = "foldername" $doc = FileFindFirstFile($thefolder & "\*.doc") $doc = FileFindNextFile($doc) ShellExecute($thefolder & "\" & $doc) If you need to open more files or further define the search you can just expand on this. edit: added folder thingy Edited April 30, 2010 by hawky358
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