Dim nom1 As String Dim nom2 As String Dim i As Integer Dim nb As Integer Dim T1() As Byte Dim T2() As Byte nom1 = "C:\...\FichierEntrée.txt" nom2 = "C:\...\FichierSortie.txt" Open nom1 For Binary As #1 nb = LOF(1) ReDim T1(nb - 1) Get #1, , T1 Close #1 ReDim T2(nb \ 2 - 1) For i = 0 To nb - 2 Step 2 T2(i \ 2) = (T1(i) - 48) * 16 + T1(i + 1) - 48 Next Open nom2 For Binary As #1 Put #1, , T2 Close #1
Dim variable As String * 2 Dim i As Long Dim lg As Long lg = (FileLen("c:\temp\essai1.txt") / 2) - 1 Open "c:\temp\essai1.txt" For Random As #1 Len = Len(variable) Open "c:\temp\essai2.txt" For Output As #2 For i = 1 To lg Get #1, i, variable Print #2, Chr$(CInt("&H" & variable)); Next Close #1 Close #2
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question