Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Listing files and folders

Options
  • 20-07-2004 11:14am
    #1
    Closed Accounts Posts: 537 ✭✭✭


    Does anyone know a function that will list files and folders in a directory


Comments

  • Registered Users Posts: 21,264 ✭✭✭✭Hobbes


    dir *.*


  • Registered Users Posts: 7,468 ✭✭✭Evil Phil


    Originally posted by Hobbes
    dir *.*

    rofl

    If your talking about the FileSystemObject JB you'll find everything you can need here.


  • Closed Accounts Posts: 537 ✭✭✭JohnnyBravo


    Thanks very much lads very helpful


  • Registered Users Posts: 27,163 ✭✭✭✭GreeBo


    what language/platform?


  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 91,682 Mod ✭✭✭✭Capt'n Midnight


    If you can open a text file - it will include hidden files etc.
    dir , /B  > filelist.txt
    
    Used to use something like this with a SHELL command , quick n' nasty


  • Advertisement
  • Closed Accounts Posts: 35 Ivan Dunaev


    Dim sNextFile As String
    sNextFile = Dir("C:", vbNormal +vbHidden + vbSystem + vbDirectory + vbReadOnly)
    While sNextFile <> ""
    Console.WriteLine(sNextFile)
    sNextFile = Dir()
    End While

    ---

    vb.net example, may be you shoud adoptate it to vb6. main cue is a Dir() function


Advertisement