Hirdetés
Ú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!
- Milyen asztali (teljes vagy fél-) gépet vegyek?
- Vezetékes FEJhallgatók
- Eltűnt a fél internet!
- BestBuy ruhás topik
- Nothing Ear (3) - mikrofonpróba
- Sony Xperia 1 V - kizárólag igényeseknek
- Xbox Series X|S
- Autóápolás, karbantartás, fényezés
- Bemutatkozott a Poco X7 és X7 Pro
- Xiaomi 15T - reakció nélkül nincs egyensúly
- További aktív témák...
- DELL Latitude 5495 (AMD Ryzen 5 PRO / 16GB DDR4 / AMD VEGA 8 / 256GB / Windows 11)
- DELL VOSTRO 3490 (Core i5--10210U / 16GB / 256GB / 14"FHD / HUN BILL/ Win11) 27% ÁFA
- Xiaomi Redmi Note 13 8/256GB fekete garanciával
- Xiaomi 15T Pro 12/512gb - Makulátlan, Euronics számla, garancia, akár beszámítással
- iPhone 15 Pro Max Spacegray 100% akkumulátorral!
- REFURBISHED - DELL Thunderbolt Dock WD19TBS (210-AZBV)
- Telefon felváráslás!! Samsung Galaxy S22/Samsung Galaxy S22+/Samsung Galaxy S22 Ultra
- LG 65B3 -65" OLED - 4K 120Hz 1ms - NVIDIA G-Sync - FreeSync Premium - HDMI 2.1 - PS5 és Xbox Ready
- Apple iPhone Xs 64GB, Kártyafüggetlen, 1 Év Garanciával
- Honor Pad X8 / 4/64GB / Wi-Fi / 12 Hó Garancia
Állásajánlatok
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest
Cég: Laptopműhely Bt.
Város: Budapest


