Hirdetés
- Apple Watch Ultra - első nekifutás
- Garmin Instinct – küldetés teljesítve
- Motorola G86 - majdnem Edge
- Samsung Galaxy Watch4 és Watch4 Classic - próbawearzió
- Samsung Galaxy S25 - végre van kicsi!
- Kiszivárgott, mikor érkezik a Galaxy S26
- Megérkezett a Pixel 5 és 4a 5G
- Honor Magic8 Pro - bevált recept kölcsönvett hozzávalókkal
- Milyen hagyományos (nem okos-) telefont vegyek?
- Soundcore Sleep A30 - a hosszú házasság titka
Új hozzászólás Aktív témák
-
wwlaci
csendes tag
válasz
Gregorius
#1014
üzenetére
Szia!
találtam egy ilyen megoldást, de nem tudom, hogyan tudom
megjeleníteni ennek az eredményét listboxban.Imports System.Collections
Imports System.IO
Imports System
Public Class Form1Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End SubPrivate Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
End Sub
End ClassPublic NotInheritable Class Directory
Public Class RecursiveFileProcessorPublic Overloads Shared Sub Main(ByVal args() As String)
Dim path As String
For Each path In args
If File.Exists(path) Then
' This path is a file.
ProcessFile(path)
Else
If System.IO.Directory.Exists(path) Then
' This path is a directory.
ProcessDirectory(path)
Else
Console.WriteLine("{0} is not a valid file or directory.", path)
End If
End If
Next path
End Sub 'Main' Process all files in the directory passed in, recurse on any directories
' that are found, and process the files they contain.
Public Shared Sub ProcessDirectory(ByVal targetDirectory As String)
Dim fileEntries As String() = System.IO.Directory.GetFiles(targetDirectory)
' Process the list of files found in the directory.
Dim fileName As String
For Each fileName In fileEntries
ProcessFile(fileName)Next fileName
Dim subdirectoryEntries As String() = System.IO.Directory.GetDirectories(targetDirectory)
' Recurse into subdirectories of this directory.
Dim subdirectory As String
For Each subdirectory In subdirectoryEntries
ProcessDirectory(subdirectory)
Next subdirectoryEnd Sub 'ProcessDirectory
' Insert logic for processing found files here.
Public Shared Sub ProcessFile(ByVal path As String)
Console.WriteLine("Processed file '{0}'.", path)
End Sub 'ProcessFile
End Class 'RecursiveFileProcessor
End Class
Új hozzászólás Aktív témák
● ha kódot szúrsz be, használd a PROGRAMKÓD formázási funkciót!
- Okos Otthon / Smart Home
- Apple Watch Ultra - első nekifutás
- A fociról könnyedén, egy baráti társaságban
- Építő/felújító topik
- Ford topik
- GL.iNet OFF topik
- Autós topik
- Garmin Instinct – küldetés teljesítve
- Motorola G86 - majdnem Edge
- One otthoni szolgáltatások (TV, internet, telefon)
- További aktív témák...
- Kingston Fury Beast 2x8GB ddr4 2666mhz KF426C16BBK2
- OHH ! Dell Latitude 9430 Üzleti Profi Prémium Ultrabook 14" -80% i7-1265U 32/1TB IRIS Xe FHD+
- Canon EOS 200D +kit objektív és táska ( 6100 expo )
- Chieftec Eco Series 600W táp eladó!
- Szinte Új Razer Kraken 2019 Fekete/Fehér/Zöld Bolti ár:20k INGYEN FOXPOST
- HIBÁTLAN iPhone SE 2020 64GB Red -1 ÉV GARANCIA - Kártyafüggetlen, MS4366
- magyar billentyűzet - 165 - Lenovo Legion Pro 7 (16IRX9H) - Intel Core i9-14900HX, RTX 4080
- Samsung Galaxy S24 5G 128GB, Kártyafüggetlen, 1 Év Garanciával
- ÁRGARANCIA!Épített KomPhone Ryzen 5 7600X 32/64GB RAM RTX 5060 Ti 8GB GAMER PC termékbeszámítással
- Ventilátor bazár /NZXT/CORSAIR/LIAN LI/DEEPCOOL/ZALMAN/120MM/140MM/VEZÉRLŐK/LED KIT-ek/
Állásajánlatok
Cég: Central PC számítógép és laptop szerviz - Pécs
Város: Pécs
Cég: Laptopműhely Bt.
Város: Budapest


