rossnixon Posted April 30, 2007 Posted April 30, 2007 Hi there, I am pulling a full path into a script using $var = $CmdLine[1] (tested this, working OK). I am right-clicking a certain filetype to run a compiled script on. How do I split $var into three new variables - the directory path, filename, extension. Thanks, Ross
Shevilie Posted April 30, 2007 Posted April 30, 2007 StringinStr StringRight StringLeft... Theres a bounch of string tools, you should be able to find some there will fit your need Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit
smashly Posted April 30, 2007 Posted April 30, 2007 Also, my favorite for splitting a path is _PathSplit. More info and example in AutoIt help file under User Defined Functions->File Management->_PathSplit Cheers
rossnixon Posted April 30, 2007 Author Posted April 30, 2007 Also, my favorite for splitting a path is _PathSplit. More info and example in AutoIt help file under User Defined Functions->File Management->_PathSplitThanks. Hopefully that will help someone else when they search the forum.I managed to get it done using the first answer.It was easier than I thought, especially since I could search from the right hand side for the "\".Ross
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now