Jump to content
Sign in to follow this  

PDF Finder

Recommended Posts

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



$filepath = ($path & $file & $ext)

If FileExists($filepath) Then

ShellExecute( $filepath, "" , "" , "" , @SW_MAXIMIZE )

$bLoop = 0 ; Exit the loop - ExitLoop would have been an alternative too :unsure:


MsgBox(0, " NOT VALID", "Not a Valid Number!")




Edited by Bucktail

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...