home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 63 / CDACTUAL63.iso / Aplicaciones / DarkBasic / DemoDarkBasic.exe / help / examples / input / exam13.dba < prev    next >
Encoding:
Text File  |  2000-01-25  |  617 b   |  24 lines

  1. Rem * Title  : Copying a File
  2. Rem * Author : DBS-LB
  3. Rem * Date   : 1st January 2000
  4. rem ============================================
  5. rem DARK BASIC EXAMPLE PROGRAM 13
  6. rem ============================================
  7. rem This program copies an existing file to a new file
  8. rem --------------------------------------------
  9.  
  10. rem Set filenames
  11. sourcefile$="exam13.dba"
  12. destfile$="newfile.txt"
  13.  
  14. rem Copy an existing file to a new file
  15. if file exist(sourcefile$)=1
  16.     if file exist(destfile$)=0
  17.         copy file sourcefile$,destfile$
  18.         print "file copied."
  19.     else
  20.         print "file already exists."
  21.     endif
  22. endif
  23.  
  24.