WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: USMuscle on August 25, 2016, 06:09:15 PM

Title: AskDirectory Problem
Post by: USMuscle on August 25, 2016, 06:09:15 PM
I am using AskDirectory with the 4 flag. Whenever I make a new folder in the Browse for Folder window, and then name the folder, WB always thinks the new folder name is "New Folder", which is what Windows initially names new folders upon their creation until you type in a different name, which I do each time. I've tried making the new folder using the Make New Folder button, and via a right-click, but the result is the same. How can I get this function to return the name I enter for the new folder?

Just to be certain I made the folder correctly, when I run the script again, I can see the new name of the new folder, so I know that "stuck" when I named it originally. When I select the new folder at this point, WB indeed returns the correct name of the folder. The problem only happens when creating a new folder in the Browse for Folder window.

Thank you.
Title: Re: AskDirectory Problem
Post by: td on August 25, 2016, 08:40:14 PM
This is a known issue, MrLeadFoot.  Try the COM Automation shell common dialog instead.

http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/OLE~COM~ADO~CDO~ADSI~LDAP/Samples~from~Users+Directory~Browse~Dialog~Created~Using~OLE~Shell~Functions.txt
Title: Re: AskDirectory Problem
Post by: snowsnowsnow on August 26, 2016, 12:51:37 AM
Are USMuscle and MrLeadFoot the same person?
Title: Re: AskDirectory Problem
Post by: td on August 26, 2016, 06:44:44 AM
Yup.
Title: Re: AskDirectory Problem
Post by: USMuscle on August 26, 2016, 12:54:45 PM
First, thanks, TD, for the info on the AskDirectory issue.

Secondly, to clear things up, LeadFoot and are not the same people, although we do work together. I have recently been charged with taking over LeadFoot's responsibilities here. In fact, I didn't even know who LeadFoot was until very recently. In the future, I will try to ensure there are no double-posts going on, which is unlikely as LeadFoot has indicated he is moving on, but you never know what the future holds.