Forum Discussion

almmatt's avatar
almmatt
Contributor
10 years ago
Solved

Check folder path in Explorer window

I have read in the community it can be difficult to automate Windows Explorer due to different operating systems. My task is to use an operation in my application to locate a file or folder on disk u...
  • djadhav's avatar
    djadhav
    10 years ago

    You can try this. It uses the FindChild method to look within all Sys process which will include all Explorer processes.

     

    SUB TestSol2
      DIM tst, PropNames, PropValues
      ' Creates arrays of property names and values
      PropArray = Array("Name", "Visible")
      ValuesArray = Array("Window('*', 'Music', 1)", "True")  'This will change with folder name we are looking for
      
      SET tst = Sys.FindChild(PropArray, ValuesArray, 10)
      IF tst.Exists THEN
        Log.Message("The folder was found open in exlporer")
      ELSE
        Log.Error("The folder was not found open in exlporer")
      END IF
      Delay(1000)
    END SUB