lattey Posted May 11, 2017 Share Posted May 11, 2017 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 Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted May 11, 2017 Moderators Share Posted May 11, 2017 @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") "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
lattey Posted May 11, 2017 Author Share Posted May 11, 2017 sorry.. i didnt try it.. i thought it it will be same with linux platform. thank you for clarify. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted May 12, 2017 Moderators Share Posted May 12, 2017 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". "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
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