Page 1 of 1

Directory!!

Posted: Fri Aug 16, 2013 7:59 am
by alfrqan
hey
I am trying to take the drive: from any directory..I dont know how to do that
such taking out drive "c:" in this example and storing it in a variable and storing the remaining of the directory in other variable such "/xx/xx/xx/xx/../.."
c:/xx/xx/xx/xx/../..
or taking out drive "d:" ,storing it in a variable and remaining of the directory should be stored in other variable
I dont know how to do that
please let me know if u have any way

Re: Directory!!

Posted: Fri Aug 16, 2013 12:03 pm
by FrancescoT
Dear User,

you could use "Parse String" command to "Split the string" at the first occurrence of the "/" pattern ... then store the result in a custom variable.

Hope this helps you.

Regrads

Re: Directory!!

Posted: Fri Aug 16, 2013 2:10 pm
by alfrqan
wow thanks haaaaaard ,it works
But what about if i want to do reverse way?
like combining 2 variables to represent the string i want
variable 1: "c:" -->AOCDrive
variable 2:"/xx/xx/.." -->AOCDIR
combining the 2 strings i get "c:/xx/xx/../"

this is not working--> $AOCDrive$$AOCDIR$ using set variable into TARGETDIRAOC
what do u think i have to do?to solve it?

Re: Directory!!

Posted: Fri Aug 16, 2013 5:58 pm
by alfrqan
well thAnks everything works

thnxxxxxxx