Jump to content
Sign in to follow this  

Small question

Recommended Posts

I'm pretty new to AutoIt, so forgive me if this has been covered or is in the wrong forum, but I can't find it. :D

How can I edit a path that I have received in a variable? I created a browse button that will look for an excel file, and I want to filter out just the file name from the path:

EX. path = c:\folder\FileName.xls

I would like to extract the FileName.xls part to add to a variable for use later on in the script.

(And the c:\folder\ part will not always be the same path)

Any help is appreciated.


Share this post

Link to post
Share on other sites

You may also want to check out the _PathSplit function.

From the help file:

#include <file.au3>
Dim $szDrive, $szDir, $szFName, $szExt
_PathSplit(@ScriptFullPath, $szDrive, $szDir, $szFName, $szExt)
MsgBox(0,"_PathSplit",$szFName& $szExt)

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