Jump to content
Sign in to follow this  
arcticpup

Get file path

Recommended Posts

arcticpup

Hi,

I'm ertrieving a value from SQL and need help with getting the file path (The SQL string contains the full path and filename, so I want to remove just the name)

the object of this is to create a shortcut to the file directory on the users desktop. Shortcut creates fine, SQL value retrieves fine, just need help with removing the file name?

Cheers!

Share this post


Link to post
Share on other sites
Inverted

Use the string functions to split the string left from the last "\" character (I guess)

Share this post


Link to post
Share on other sites
arcticpup

Use the string functions to split the string left from the last "\" character (I guess)

Thank you, I guessed it would be the string functions, but which ones given that the file name is not a set length?

Share this post


Link to post
Share on other sites
logmein

i suggest using _PathSplit($szPath, ByRef $szDrive, ByRef $szDir, ByRef $szFName, ByRef $szExt) , the AutoIT help file may be useful :-)

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.