Visualizzazione dei risultati da 1 a 6 su 6

Discussione: elenco cartelle in c:

  1. #1

    elenco cartelle in c:

    ciao a tutti,

    vorrei fare un ciclo che immetta in una lista l'elenco delle cartelle rpesenti nel disco c:
    come posso fare?

    grazie mille!!
    ::: Crepes Designer ::: http://www.mauriziobrevi.com

  2. #2
    Utente di HTML.it
    Registrato dal
    Jul 2001
    Messaggi
    798
    devi usare il comando Dir.
    Ans.

  3. #3
    grazie ans, mi faresti un esempio pratico?
    ::: Crepes Designer ::: http://www.mauriziobrevi.com

  4. #4
    Utente di HTML.it
    Registrato dal
    Jul 2001
    Messaggi
    798
    e l'help che è stato inventato a fare?
    Ans.

  5. #5
    speravo non fosse necessario dirlo ma non ho installato msdn quindi niente help, in queste condizioni programmare è un po più difficile, converrai anche tu, grazie lo stesso
    ::: Crepes Designer ::: http://www.mauriziobrevi.com

  6. #6
    Utente di HTML.it
    Registrato dal
    Jul 2001
    Messaggi
    798
    E' anche consultabile online msdn.

    Direttamente da msdn online:

    codice:
    MyPath = "c:\"   ' Set the path.
    MyName = Dir(MyPath, vbDirectory)   ' Retrieve the first entry.
    Do While MyName <> ""   ' Start the loop.
          ' Use bitwise comparison to make sure MyName is a directory.
          If (GetAttr(MyPath & MyName) And vbDirectory) = vbDirectory Then
             ' Display entry only if it's a directory.
             Debug.Print MyName
          End If   
       MyName = Dir()   ' Get next entry.
    Loop
    Ans.

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.