problem in SET DEFAULT TO (hidden folder)


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: problem in SET DEFAULT TO (hidden folder)

  1. #1
    liew wai foong Guest

    problem in SET DEFAULT TO (hidden folder)


    hi all.

    question 1:
    I have a folder(say, named "myfolder") with attribute set to hidden.
    When i issue SET DEFA TO myfolder, an error message "Invalid path or file
    name" prompted. I would like to know whether is there anyway to issue the
    SET DEFAULT TO command to a hidden folder.

    question 2:
    I use a few API functions namely FindFirstFile and FindNextFile to scan directory.
    They work fine for normal files but skip hidden files, so the number of files
    being scanned I get is less than the actual no of files, unlike ADIR() in
    VFP where it can scans all files including hidden files. Is there anyway
    to use the API functions to scan hidden files instead of
    ADIR() ?

    any one can help ?

    thank you very much in advance.

  2. #2
    Stefan Wuebbe Guest

    Re: problem in SET DEFAULT TO (hidden folder)

    Hi
    > question 1:
    > I would like to know whether is there anyway to issue the
    > SET DEFAULT TO command to a hidden folder.


    AFAIK you cannot. Personally I don't worry, since you still
    can address it, e.g. SET PATH TO it, STRTOFILE() etc.
    ..

    > question 2:

    Don't know for the APIs, I use ADIR(). Did you try WSH?
    objFSO=create("scripting.filesystemobject")
    objFolder=objFSO.getfolder("d:\temp\test")
    FOR EACH oFile IN objFolder.Files
    ?JUSTFNAME(oFile.Name) && Name only
    ?JUSTEXT(oFile.Name) && Extension only
    ?oFile.Path
    ?oFile.DateLastModified
    ?oFile.Size
    ENDFOR
    (quoted from a message by John Koziol)


    hth
    -Stefan

    "liew wai foong" <waifoong@asialife.com.my> schrieb im Newsbeitrag news:3b8dfccd$1@news.devx.com...
    >
    > hi all.
    >
    > question 1:
    > I have a folder(say, named "myfolder") with attribute set to hidden.
    > When i issue SET DEFA TO myfolder, an error message "Invalid path or file
    > name" prompted. I would like to know whether is there anyway to issue the
    > SET DEFAULT TO command to a hidden folder.
    >
    > question 2:
    > I use a few API functions namely FindFirstFile and FindNextFile to scan directory.
    > They work fine for normal files but skip hidden files, so the number of files
    > being scanned I get is less than the actual no of files, unlike ADIR() in
    > VFP where it can scans all files including hidden files. Is there anyway
    > to use the API functions to scan hidden files instead of
    > ADIR() ?
    >
    > any one can help ?
    >
    > thank you very much in advance.








  3. #3
    liew wai foong Guest

    Re: problem in SET DEFAULT TO (hidden folder)


    thank you stefan
    i'll have further try on scription.filesystemobject

    thank you again

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center