تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
مساعدة فى ListView
#5
السلام عليكم

استخدم هذه الدالة لنسخ المجلد:

PHP كود :
Private Sub copydir(ByVal source As StringByVal dest As String)
        
Dim dinfo As New DirectoryInfo(dest)
        If (
Not dinfo.ExistsThen
            Directory
.CreateDirectory(dest)
        
End If

        
dinfo = New DirectoryInfo(source)
        
Dim d() As DirectoryInfo dinfo.GetDirectories()
        
Dim finfo As FileInfo() = dinfo.GetFiles()

        For 
Each f As FileInfo In finfo
            f
.CopyTo(Path.Combine(destf.Name), False)
        
Next

        
For Each dd As DirectoryInfo In d
            copydir
(Path.Combine(sourcedd.Name), Path.Combine(destdd.Name))
        
Next
    End Sub 

والاستدعاء يكون بالCop هكذا:

PHP كود :
Dim f As New CopyTo()
        
f.ShowDialog()
        If 
ListView1.SelectedItems(0).Text.Contains("."Then
            Dim info 
As New FileInfo(ListView1.SelectedItems(0).Text)
            
File.Copy(Application.StartupPath "/sajad/" ListView1.SelectedItems(0).Textf.PP info.Extension)
            
MessageBox.Show("تم النسخ الى المسار التالي" f.PP)
        Else
            
copydir(Application.StartupPath "/sajad/" ListView1.SelectedItems(0).Textf.PP
        End 
If 

بالتوفيق ان شاءالله
الرد }}}
تم الشكر بواسطة:


الردود في هذا الموضوع
مساعدة فى ListView - بواسطة ali.alfoly - 26-03-13, 10:05 AM
مساعدة فى ListView - بواسطة Sajad - 26-03-13, 11:01 PM
مساعدة فى ListView - بواسطة ali.alfoly - 27-03-13, 12:43 PM
مساعدة فى ListView - بواسطة Sajad - 27-03-13, 07:54 PM
مساعدة فى ListView - بواسطة Sajad - 27-03-13, 09:01 PM
مساعدة فى ListView - بواسطة ali.alfoly - 28-03-13, 08:07 AM
مساعدة فى ListView - بواسطة Sajad - 28-03-13, 07:01 PM
مساعدة فى ListView - بواسطة ali.alfoly - 29-03-13, 02:36 AM
مساعدة فى ListView - بواسطة ali.alfoly - 29-03-13, 02:37 AM
مساعدة فى ListView - بواسطة Sajad - 29-03-13, 10:30 AM


التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم