FileCopy copies files only. To copy a single folder (including its subfolders), use FileCopyDir. To instead copy the contents of a folder (all its files and subfolders), see the examples section of FileCopy
UTF-16: Unicode UTF-16 with little endian byte order, equivalent to CP1200
UTF-8-RAW or UTF-16-RAW: As above, but no Byte Order Mark (BOM*) is written when a new file is created
CPnnn: a code page with numeric identifier nnn. See Code Page Identifiers. (UTF-8 is CP65001, UTF-16 is CP1200)
Empty or omitted: the system default ANSI code page, which is also the default setting* The byte order mark (BOM) is a Unicode character, U+FEFF byte order mark (BOM), whose appearance as a magic number at the start of a text stream can signal several things to a program consuming the text
FileRead, Var, *P65001 %file_path% ;-Read in the file using UTF-8 Encoding
When the goal is to load all or a large part of a file into memory, FileRead performs much better than using a file-reading loop.
FileOpen() provides more advanced functionality than FileRead, such as reading or writing data at a specific location in the file without reading the entire file into memory
When Reading / Writing to a file many times, FileObject is much faster as it does not open/close the file each time
A file-reading loop is useful when you want to operate on each line contained in a text file, one at a time. It performs better than using FileReadLine because:
the file can be kept open for the entire operation
the file does not have to be re-scanned each time to find the requested line number.
Lines up to 65,534 characters long can be read. If the length of a line exceeds this, its remaining characters will be read during the next loop iteration
To load an entire file into a variable, use FileRead because it performs much better than a loop (especially for large files).
Reads the specified line from a file and stores the text in a variable
It is strongly recommended to use this command only for small files, or in cases where only a single line of text is needed. To scan and process a large number of lines (one by one), use a file-reading loopfor best performance. To read an entire file into a variable, use FileRead