Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How To Copy And Rename Files Using Free Basic
#31
Quote:
Code:
open file1$ for binary as #1
ll = lof(1)
redim fbuff(ll-1) as ubyte
get #1, 1, fbuff()
close #1

kill file2$
open file2$ for binary as #1
put #1, 1, fbuff()
close #1
redim fbuff(0) as ubyte
Enjoy

Z!re,

Your routine is amazing when compiled and run with Freebasic!

Old problems in QB are handled correctly and just go away, like:
- When input file does not exist.
- When input file is a zero-length-file.
- Doing a KILL to a non-existent file.
- other subtleties.

Nice work!
*****
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)