yton 0 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 Share this post Link to post Share on other sites
hawky358 0 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 Share this post Link to post Share on other sites