Accessing Hidden Files

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vdraceil
    New Member
    • Jul 2007
    • 236

    Accessing Hidden Files

    How do I access hidden files from within vb6.0? It's unlike ordinary files!! VB does not even sense that file in a folder.
    Last edited by Killer42; Nov 19 '07, 01:41 AM.
  • AHMEDYO
    New Member
    • Nov 2007
    • 112

    #2
    Hi.

    First you didn't say what code you are using. You have two method to open file using vb6, FileSystemObjec t class and Open keyword, and I was testing these two methods and all work well and no problem while opening hidden files.

    Waiting your reply,

    GOOD LUCK
    Last edited by Killer42; Nov 19 '07, 01:42 AM.

    Comment

    • Killer42
      Recognized Expert Expert
      • Oct 2006
      • 8429

      #3
      Originally posted by vdraceil
      How do I access hidden files from within vb6.0? It's unlike ordinary files!! VB does not even sense that file in a folder.
      As AHMEDYO pointed out, you haven't really given us much detail on what you are trying to do, and how.

      For instance, when you say "from within VB" do you mean that you are in the VB6 IDE and just want to use File | Open to open something like a FRM file, which is hidden? Or do you want your code to open a file, or what? And is the problem actually in opening the file (which from AHMEDYO seems to have done successfully) or in finding the file? They're not the same thing. Plus, you don't necessarily have to be able to see a file to open it.

      While you have a think about the responses so far, you might want to consider the following...
      • If using the Dir() function to retrieve file names, you can specify in the attributes argument to include hidden files.
      • If using FileSystemObjec t, here's what the online help says about the Folder object... "Returns a Files collection consisting of all File objects contained in the specified folder, including those with hidden and system file attributes set."

      Comment

      • vdraceil
        New Member
        • Jul 2007
        • 236

        #4
        I used FileSystemObjec t,but i got the response that it was an invalid path.Let me try once again and if i really have a problem i'll come back.
        Thanks for ur response!

        Comment

        • AHMEDYO
          New Member
          • Nov 2007
          • 112

          #5
          HI..

          can you post example from your code?

          Best Regards

          Comment

          Working...