Author Topic: Windows 10 / Using WinItemize how can I tell that a window is a Directory  (Read 952 times)


  • Newbie
  • *
  • Posts: 1
Hi There All,

Does anyone know of a way to tell if a window on a Windows 10 machine is a Directory.

I used to be able to use the WinItemize command and the following bit of script to identify all of the windows that were open and that were Directories viewing a file system.

The changes in the way Windows 10 presents information to the WinItemize command has broken my script where I used to detect the "\\" in the extracted items, this no longer works. The "\\" is no longer present.

Please advise?



allwins = WinItemize( )
n = ItemCount(allwins, @TAB)

for a = 1 to n
   if DirExist(test) && StrIndex(test,"\\",1,@FWDSCAN)==0 then
next a

if mywind=="" then exit


  • Pundit
  • *****
  • Posts: 868
    • Data & Stuff Inc.
If you have File Explorer set to show the full file path in title bar it should show...assuming those are the Windows of which you speak?



  • Tech Support
  • *****
  • Posts: 2478
    • WinBatch
Windows Explorer has had the option to "Display full path in title bar" since at least Windows XP.  So if you are referring to a "File Explorer" - Windows 10 speak - window,   your problem has nothing to do with Windows 10 and everything to do with whether or not the display path option is enabled.

Your only options are to make sure the  "Display full path in title bar" is enabled or walk the window hierarchy to find the "ToolbarWindow32" child window that displays the full path in File Explorer and check its Window text.   Roboscripter and/or the analyze.wbt script should be of help with the latter approach.
"Success is a lousy teacher. It seduces smart people into thinking they can't lose."
  - Bill Gates


  • Tech Support
  • *****
  • Posts: 2478
    • WinBatch
RoboScripter output on Window 10:

Code: Winbatch
; Made with
;   RoboScripter ver: 45
;   CtlMgr ver: 44040

;Title: Address: \\INTREPID\WinBatch
;ID: 1001
;Class: ToolbarWindow32
;Level: 7

; Default cWndByWndSpec seems OK here
; window1=cWndByWndSpecName("\\INTREPID\WinBatch","explorer",7,0,0,0,0,0,0,0)
; window1=DllHwnd('\\INTREPID\WinBatch')
; or window2=cWndBySeq(window1,5)
; or window3=cWndByClass(window2,`ReBarWindow32`)
; or window3=cWndBySeq(window2,1)
; or window4=cWndByClass(window3,`Address Band Root`)
; or window4=cWndBySeq(window3,3)
; or window5=cWndByClass(window4,`msctls_progress32`)
; or window5=cWndBySeq(window4,1)
window6=cWndByClass(window5,`Breadcrumb Parent`)
; or window6=cWndBySeq(window5,1)
; or ControlHandle=cWndByName(window6,`Address: \\INTREPID\WinBatch~`)
; or ControlHandle=cWndByClass(window6,`ToolbarWindow32`)
; or ControlHandle=cWndBySeq(window6,1)
result=cWndInfo(ControlHandle,0)     ;Reads the title/text of a control
Message("Window Title/Text",result)     ;TODO - Remove Message.  Add code.

"Success is a lousy teacher. It seduces smart people into thinking they can't lose."
  - Bill Gates