Wilson WindowWare Tech Support

WinBatch WinBatch+Compiler WebBatch
Home | Tech Database | Tech BBS | White Papers | Purchase


1422: DirAttrSet: Directory Not Found or Access Denied

Keywords: 	   1422  DirAttrSet

Question:

I created a subdirectory
    c:\junk
under that I created 3 subdirs
    test1
    test2
    test3
I made test3 a hidden directory.

Then I run the following script:

DirAttrSet("*.*", "rash")
message(1,2)
a=DirItemize("*.*")
message("",a)
which generates a 1422 error.

Then I change the mask to "*.":

DirAttrSet("*.", "rash")
message(1,2)
a=DirItemize("*.*")
message("",a)
and it doesn't complain, but it also doesn't unhide the directory.

What gives?

Answer:

DirAttrSet does not take wild cards. The list must be a tab-delimited or vertical bar list. So what you need to do is the following:

  1. Use the IntControl(5,1,0,0,0) to unhide the directory.
        DirAttrSet(DirItemize("*.*"), "rah")
    

Article ID:   W14141
Filename:   1422 DirAttrSet Directory not Found or Access Denied.txt