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.


File Searcher

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

Dealing File and Directory Names that Contain Non Displayable Characters


I get a 546 Invalid file/directory name, passing the result of srchnext to wntAccessList. I've found a non displayable character in the directory name(see display below). According the the debugtrace log, srchnext returns a ? for the non-displayble character. How can I use wntAccessList on this directory without renaming the directory? We have 1000s of directories like this. Here's a portion of the error log generated with the debugtrace option;
while 1 
(116000) WHILE==>TRUE 

(116000) VALUE=> "G:\Groups\Sales & Mktg\Member\Communications\ MarCom personal\Bill\Z_Production stuff\  quotes?templates\" 

if object=="" then break 
(116015) ==>FALSE=> (skipped) 

StatusboxUpd(sb,strcat("Scanning ",object)) 
(116015) CALLING UDF (statusboxupd) 

StatusboxUpd(sb,strcat("Scanning ",object)) 
(116093) VALUE=> 0 

(116109) VALUE=> 22 

objectlen= StrLen(object) 
(116109) VALUE=> 105 

error1 = lasterror() 
(116109) VALUE=> 0 

If StrIndex(object,"pagefile.sys",1,@FWDSCAN)==0 then 
(116109) IF DO==>TRUE 

(124890) VALUE=> 0 

TERMINAL EXTENDER ERROR=>546 (546: Invalid file/directory name) 

;;;END OF JOB;;; 


I think the only non-displayable characters would be Unicode, and we don't have support for Unicode directories yet. We are currently in the process of adding Unicode support to WinBatch. However there is no guarantee of if or when it might be released.


  1. Rename the file/directory using DOS, then use the WinBatch script to search the directory path.
  2. Ignore all directories with a question mark in them.

Article ID:   W16858
File Created: 2017:07:28:13:58:29
Last Updated: 2007:07:03:14:26:36