Results 1 to 7 of 7

Thread: How can I find Hidden Files or Folders?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 2006
    Posts
    185

    How can I find Hidden Files or Folders?

    I want to search hidden files and hidden Folders one by one of (c:\myFolder\), Then i want to make a list.

    How to do it?

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: How can I find Hidden Files or Folders?

    As this is not database related, I have moved it from the Database Development forum.

    Duplicate threads deleted

  3. #3
    Frenzied Member numtel's Avatar
    Join Date
    Apr 2000
    Location
    CA
    Posts
    1,163

    Re: How can I find Hidden Files or Folders?

    I just wrote a function that loops through directories and then puts all the file names in a collection.

    This should work for you.
    Attached Files Attached Files

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Feb 2006
    Posts
    185

    Re: How can I find Hidden Files or Folders?

    Nice! Just what I find.
    Thank you numtel


    One thing - How can I get the Last Folder name in the path?
    I mean,
    In the path
    ___________myPath = "C:\new folder\pro\"
    I want to get
    ___________myFolder = "pro"

  5. #5
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: How can I find Hidden Files or Folders?

    Try this
    Code:
    Private Sub Command1_Click()
    Dim MyPath As String
    Dim arrFolder() As String
    MyPath = "C:\new folder\pro"
    arrFolder = Split(MyPath, "\")
    MsgBox arrFolder(UBound(arrFolder))
    End Sub

  6. #6
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628

    Re: How can I find Hidden Files or Folders?

    Code:
    dim pathparts() as string
    pathparts = split(mypath, "\")
    if pathparts(ubound(pathparts)) <> "" then
       msgbox pathparts(ubound(pathparts))
    else
      msgbox pathparts(ubound(pathparts)-1)
    end if
    edit: looks like hack beat me, but i am not sure if you will get an empty array element thanks to your trailing slash, so my code went ahead and assumed you did.
    Last edited by Lord Orwell; Aug 14th, 2007 at 02:54 PM. Reason: fixed code tag
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Feb 2006
    Posts
    185

    Re: How can I find Hidden Files or Folders?

    thank you Hack
    thank you Lord Orwell
    Last edited by r_amin; Aug 14th, 2007 at 04:24 PM. Reason: spelling

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width