Jump to content
lattey

autoit: ignore the sensitive Case

Recommended Posts

lattey

i have filename that i get from setting file . for example, 8889_1_ER_R1_P1_R34.
i need to get the file from certain folder by referring the filename butt without the P1 part. soo, the folder name will be 8889_1_ER_R1_R34. the 8889_1_ER_R1_P1_R34 file will be in the sub folder of 8889_1_ER_R1_R34. my code is as below:

$getname = StringSplit( $Prog, "_")

$folder = $getname[1] & "_" & $getname[2] & "_" & $getname[3] & "_" &  $getname[4] & "_" &  $getname[6]

$path = "c:\users" & $folder & "\programs\"  & $Prog & ".exe"


    but the problem i have is the sub folder name is either programs, Programs, pRograms, and etc as long its the name is program.
    how can i ignore either upper case or lower case as long the folder name programs?

 

thanks

Share this post


Link to post
Share on other sites
JLogan3o13

@lattey have you actually tried it? Windows will not allow two folders at the same level regardless of the case. So if you try adding a folder programs, then a folder ProgRams, it will not let you. This script opens the same folder, regardless of the case:

ShellExecute(@UserProfileDir & "\programs")
ShellExecute(@UserProfileDir & "\Programs")
ShellExecute(@UserProfileDir & "\pRograms")
ShellExecute(@UserProfileDir & "\proGrams")
ShellExecute(@UserProfileDir & "\prograMs")
ShellExecute(@UserProfileDir & "\programS")

 


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
lattey

sorry.. i didnt try it.. i thought it it will be same with linux platform. thank you for clarify.

Share this post


Link to post
Share on other sites
JLogan3o13

Just an FYI, It will typically take you less time to try something for yourself than it does to post a question. And you are a lot less likely to get help from forum members if you show a pattern of "i didnt try it".


√-1 2^3 ∑ π, and it was delicious!

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

×