Jump to content

verify a directory's existence


Recommended Posts

I am using a inputbox to allow the user to enter an installation directory. It is stored as $variable2. Is there anyway to check all local drives to see if this directory exists?

For example $variable2=d:\wis5

How would i design the program to check for this directory?

All help is appreciated.

Link to comment
Share on other sites

do a drivegetdrive("fixed") then a for ... net loop of file exists... if you know it'll be in the root... otherwise, I guess you'd want to find or write a file search udf and use that in the for .. next

"I'm not even supposed to be here today!" -Dante (Hicks)

Link to comment
Share on other sites

You could alternatively use FileSelectFolder, but it is completely graphical and does not allow the user to type a path.

Edit: Also, the docs say that FileExists($variable2) should work

Edited by CyberSlug
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

You could alternatively use FileSelectFolder, but it is completely graphical and does not allow the user to type a path.

Edit:  Also, the docs say that FileExists($variable2) should work

I've used the filesavediag to have the user create a folder. You can set your root dir that way too

Rick

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...