1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
| Dim byt As Byte
Dim TAILLE_COURANTE, TAILLE_GLOBALE As Long
Dim fileNBR1, fileNBR2 As Integer
Dim FilePath1, FilePath2 As String
'ouverture des fichiers
fileNBR1 = FreeFile()
FilePath1 = txtsource.Text
FileOpen(fileNBR1, FilePath1, OpenMode.Binary)
fileNBR2 = FreeFile()
FilePath2 = txtdestination.Text
FileOpen(fileNBR2, FilePath2, OpenMode.Binary)
TAILLE_GLOBALE = FileLen(txtsource.Text)
TAILLE_COURANTE = 1
Do
FileGet(fileNBR1, byt, TAILLE_COURANTE)
FilePut(fileNBR2, byt, TAILLE_COURANTE)
TAILLE_COURANTE += 1
'proresser la progressbar
prbcopie.Value = CInt(TAILLE_COURANTE / TAILLE_GLOBALE * 100)
Loop Until EOF(fileNBR1)
FileClose(fileNBR1)
FileClose(fileNBR2) |
Partager