FILECOPY source$, dest$Copies a file from source to destination. Returns nonzero on success.
IF FILECOPY("src.txt", "dst.txt") THEN PRINT "OK"
RMDIR path$Removes an empty directory.
RMDIR "C:\\Temp\\MyFolder"
GETATTR(path$)Returns file/directory attributes as a bitmask.
LOCAL attr AS LONG
attr = GETATTR("myfile.txt")
IF attr AND 1 THEN PRINT "Read-only"
SETATTR path$, attrsSets file/directory attributes.
SETATTR "myfile.txt", &H01 ' Set read-only
RESETCloses all open files.
OPEN "data.txt" FOR OUTPUT AS #1 OPEN "log.txt" FOR OUTPUT AS #2 RESET ' Closes both #1 and #2
FLUSH #nFlushes the file buffer for the given file handle, ensuring all buffered data is written to disk.
PRINT #1, "Important data" FLUSH #1 ' Force write to disk
SETEOF #nSets the end-of-file marker at the current file position. Truncates the file beyond this point.
SEEK #1, 100 SETEOF #1 ' Truncate file at position 100
REMAIN$(#n)Returns the number of remaining characters in an open file after the last GET operation.
LOCAL remaining AS STRING remaining = REMAIN$(1) PRINT remaining; " bytes left"