Grab data / text / from one file and dump it to another with only a couple lines of code. No API. W
Grab data / text / from one file and dump it to another with only a couple lines of code. No API. Works will all VB's
Rate Grab data / text / from one file and dump it to another with only a couple lines of code. No API. W
(2(2 Vote))
'** Copy one file into another
'** Compatible with all Winblows versions of
'** Visual Basic.
'**
'** From: revega May 06, 2002
'------------------------------------------
'
' Put this inside a command button or menu
On Error GoTo stopIT
Open "c:\test.txt" For Input As #1 'your input file
Open "c:\output.txt" For Output As #2 'output file
'Note that the output file doesn't have to be created
'first because it will be created automaticly.
'Becareful too because this will overwrite the output
'file if it exists without prompting you.
go:
Input #1, A$ 'Grab text
If EOF(1) Then GoTo grabLastLine 'Check for end of file
Print #2, A$ 'Put text 'if EOF then get the
'last line of text.
GoTo go
grabLastLine: Print #2, A$
stopIT: Close #1: Close #2 'Close files
Grab data / text / from one file and dump it to another with only a couple lines of code. No API. W Comments
No comments yet — be the first to post one!
Post a Comment