- Honor Magic6 Pro - kör közepén számok
- Samsung Galaxy S25 FE - fenséges, felejthető vagy felesleges?
- Google Pixel 10 és 10 Pro összehasonlító gyorsteszt
- Apple Watch
- iPhone topik
- Milyen okostelefont vegyek?
- Samsung Galaxy Watch (Tizen és Wear OS) ingyenes számlapok, kupon kódok
- Google Pixel topik
- Huawei Watch GT 6 és GT 6 Pro duplateszt
- Xiaomi 14 - párátlanul jó lehetne
Ú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!
- ThinkPad (NEM IdeaPad)
- Házimozi belépő szinten
- Autós topik
- Okos Otthon / Smart Home
- Honor Magic6 Pro - kör közepén számok
- Samsung Galaxy S25 FE - fenséges, felejthető vagy felesleges?
- Windows 10
- Szeged és környéke adok-veszek-beszélgetek
- Tudományos Pandémia Klub
- Milyen TV-t vegyek?
- További aktív témák...
- LENOVO Legion Pro 5 16IRX8 - 16" WQXGA 240Hz - i5-13500HX - 16GB - 1TB - RTX 4060 - 9 Hó garancia
- Eladó Realme gt neo 2 5g Dobozában tokkal
- HIBÁTLAN iPhone 13 Mini 128GB Green -1 ÉV GARANCIA -Kártyafüggetlen, MS3305
- HIBÁTLAN iPhone 12 Pro Max 256GB Pacific Blue -1 ÉV GARANCIA - Kártyafüggetlen, MS3371,100% Akkumulá
- GYÖNYÖRŰ iPhone 12 mini 64GB Green -1 ÉV GARANCIA - Kártyafüggetlen, MS3054, 96% Akkumulátor
Állásajánlatok
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest
Cég: Laptopműhely Bt.
Város: Budapest