Hirdetés
- sziku69: Fűzzük össze a szavakat :)
- Luck Dragon: Asszociációs játék. :)
- sziku69: Szólánc.
- D1Rect: Nagy "hülyétkapokazapróktól" topik
- MasterDeeJay: Intel Optane M10: mire lehet használni?
- ubyegon2: Airfryer XL XXL forrólevegős sütő gyakorlati tanácsok, ötletek, receptek
- gban: Ingyen kellene, de tegnapra
- hcl: GPT diszk kisebbre klónozása
- Elektromos rásegítésű kerékpárok
- N€T0X|N: Talaria tuning: meg kéne tudni állni!
Ú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!
- iPhone 13 256GB Midnight
- Eladó Konfig Ryzen 5 5500 16GB DDR4 512GB SSD RTX2060 Super 8GB!
- Bomba ár! Lenovo ThinkPad T14 G2i - i7-11G I 16GB I 512GB SSD I 14" FHD I Cam I W11 I Garancia!
- Bomba ár! Lenovo ThinkPad T14 G2i - i5-11G I 16GB I 512GB SSD I 14" FHD I Cam I W11 I Garancia!
- Bomba ár! Lenovo ThinkPad T14 G1i - i5-10G I 16GB I 256GB SSD I 14" FHD I Cam I W11 I Garancia!
- GYÖNYÖRŰ iPhone 12 mini 256GB Black-1 ÉV GARANCIA -Kártyafüggetlen, MS3626, 100% Akkumulátor
- 274 - Lenovo Legion Pro 5 (16IAX10H) - Intel Core U9 275HX, RTX 5070Ti
- HIBÁTLAN iPhone 13 Pro 128GB Gold -1 ÉV GARANCIA - Kártyafüggetlen, MS4602, 100% Akkumulátor
- ÁRGARANCIA! Épített KomPhone Ultra 7 265KF 32/64GB RAM RX 9070 16GB GAMER PC termékbeszámítással
- Apple iPhone 13 Mini 128GB,Újszerű,Adatkabel,12 hónap garanciával
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest
