Working with files

LiveCode give us a variety of tools for manipulating both text and binary files.

Reading a file

get URL “”
put it into myString
// or
put URL “” into myString

Creating a file

put URL “” into myString
open file “myData.txt” for write — creates a file for LC to write to
write myString to file “myData.txt” — writes the variable to the text file w
close file “myData.txt” — closes/saves the text file

Renaming a file

rename file “myData.txt” to “myFile.txt”
The rename command can also be used to move files from one folder to another.

Deleting a file

delete file “myFile.txt”

Creating a folder

create folder “myFolder”

Rename a folder

rename folder “myFolder” to “renamedFolder”

Delete a folder

delete folder “renamedFolder”

Leave a Reply