04-24-2024, 10:05 AM
(04-24-2024, 08:26 AM)PhilOfPerth Wrote: It works! Thank you.
Now, onward and upward!
Is there a function to create a "backup" of a file, (say myfilebak, from myfile)?
There are no commands to directly make copies or backup of files. But you could write one with a few lines of code like:
Code: (Select All)
' Copies src to dst
' Set overwite to true if dst should be overwritten if present
SUB CopyFile (src AS STRING, dst AS STRING, overwrite AS _BYTE)
IF _FILEEXISTS(src) THEN
IF NOT _FILEEXISTS(dst) OR (_FILEEXISTS(dst) AND overwrite) THEN
_WRITEFILE dst, _READFILE$(src)
END IF
END IF
END SUB


