WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Functions

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

AskFileName Bug

 Keywords: AskFileName Problem Bug Initial Directory 

Question:

I'm using 2011A on a Win7 32bit machine. My "R:" drive is mapped to 127.0.0.1\blah\blah.

The following "works" -- the default directory in the dialog box is the directory passed:

source_file = AskFilename("Source file for sorting","R:\EngToolSupport\etc","All Files|*.*","ECAD_Uninstall.rules",1)
The following does not "work" -- the directory in the dialog box is NOT the directory passed:
source_file = AskFilename("Source file for sorting","R:\EngToolSupport\etc","All Files|*.*","ECAD_Uninstall.rules",101)
I even tried making the default directory a direct local drive, and it still didn't default to the directory passed, with the 101 argument.

What am I doing wrong?

Answer:

There does appear to be something amok here. WinBatch is doing everything it should but the Windows Shell is not cooperating.

WORKAROUND: Perhaps use 'DirChange' right before the call to 'AskFileName' as a workaround.

We found the problem. The behavior appears to be very intermittent on some newer multi-core processors while more consistent on others. That may explain why it wasn't found during unit testing. The next release 2011B should contain a fix.

Thanx for reporting the problem.


Article ID:   W17887
Filename:   AskFileName Bug.txt
File Created: 2011:02:16:09:39:42
Last Updated: 2011:02:16:09:39:42