i trying to put or statement in IF statement but its not working.
Code: Select all
Loop, Files, %dir%\*.*
{
SplitPath, A_LoopFilePath, fn,, ext
part := StrSplit(fn, "_")
If (part.1 != "abc" ) || (part.1 != "aaa" )
Code: Select all
Loop, Files, %dir%\*.*
{
SplitPath, A_LoopFilePath, fn,, ext
part := StrSplit(fn, "_")
If (part.1 != "abc" ) || (part.1 != "aaa" )
You're not stating it right, which is why your code isn't correct. You want it to run when it is not equal to abc and it is not equal to aaa. So change the || to &&. Re-read what braunbaer said as to why your logic is wrong in how you stated it in English.
Code: Select all
If !((part.1 = "abc" ) || (part.1 = "aaa" ))