Bonjour,
Je souhaite copier les fichiers du dossier P:\BE\Thomas\essai au dossier P:\BE\Thomas\essai copiage. Pour cela j'ai créé un CheckedListBox et un ListBox et j'ai écris le programme suivant :
Imports System.IO
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesMyBase.Load
For Each file AsStringIn Directory.GetFiles("P:\BE\Thomas\essai")
CheckedListBox1.Items.Add(file)
Next
For Each file AsStringIn Directory.GetFiles("P:\BE\Thomas\essai copiage")
ListBox1.Items.Add(file)
Next
File.Copy("P:\BE\Thomas\essai", "P:\BE\Thomas\essai copiage", True)
End Sub
End Class
Le problème c'est qu'il n'y a pas d'erreur d'apres l'ordinateur mis quand je debug il m'écrit : The target file "P:\BE\Thomas\essai copiage" is a directory, not a file.
Et je ne sais pas quoi faire. Merci d'avance.