Jump to content

Getting File Location


Recommended Posts

Im trying to add a function to my script to find the file location.

I have an input box with a button to the side to browse for the file (with FileOpenDialog). I want it to be able to take that file and find the exact location on the hard drive so it can be used to upload to a site.

how could i get the file location?

Link to comment
Share on other sites

From help file on FileOpenDialog:

Return Value

Success: Returns the full path of the file(s) chosen. Results for multiple selections are "Directory|file1|file2|..."

Meaning, if you used FileOpenDialog to browse for a file and only one file was selected, then you'd have you full file path as the return value of FileOpenDialog. If multiple files were selected, you need to StringSplit the return value of FileOpenDialog and process the result to get the full file path of each selected file.

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...