Bucktail Posted April 13, 2011 Share Posted April 13, 2011 (edited) Here is a simple standalone script I created that helps locate and open up pdf drawings from a directory that hold thousands of PDF files. Unfortunately this script also shows just how limited my scripting abilities are. You could change it to look for just about any sort of file. I think all you would have to do is change the $path and $ext ; Script Function: ; Checks for PDF file and the opens the requested PDF file. $path = "\\FileDirectoryPath\" $ext = ".pdf" ; Loops until the user gives a valid PDF file or cancels $bLoop = 1 While $bLoop = 1 $file = InputBox("PDF File To Open", "Please enter the PDF file number you want to open and click OK","","",250,175) If @error = 1 Then Exit Else $filepath = ($path & $file & $ext) If FileExists($filepath) Then ShellExecute( $filepath, "" , "" , "" , @SW_MAXIMIZE ) $bLoop = 0 ; Exit the loop - ExitLoop would have been an alternative too Else MsgBox(0, " NOT VALID", "Not a Valid Number!") EndIf EndIf WEnd Edited January 30, 2019 by Bucktail Link to comment Share on other sites More sharing options...
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