Qbasicnews.com
January 26, 2020, 01:43:55 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: 1 2 [3]
  Print  
Author Topic: How To Copy And Rename Files Using Free Basic  (Read 7320 times)
Moneo
Na_th_an
*****
Posts: 1971


« Reply #30 on: July 26, 2005, 03:27:55 PM »

Quote from: "Z!re"
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!
*****
Logged
Pages: 1 2 [3]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!