As demonstrated in the following code, you can use the Microsoft Small Basic File class to create file directories, access directories' files, and copy files from one file directory to another. You can also read from files and write to files.

' This code assumes that a directory named C:\Temp\ already exists.
TextWindow.WriteLine("Subdirectory created: " + File.CreateDirectory("C:\Temp\TempSubdirectory\"))
subdirectories = File.GetDirectories("C:\Temp")

If Array.GetItemCount(subdirectories) = 1 Then
  TextWindow.WriteLine("C:\Temp has 1 subdirectory.")
Else
  TextWindow.WriteLine("C:\Temp has " + Array.GetItemCount(subdirectories) + " subdirectories.")
EndIf

For i = 1 To Array.GetItemCount(subdirectories)
  TextWindow.WriteLine("subdirectories[" + i + "] = " + subdirectories[i])
  files = File.GetFiles("C:\Temp\" + subdirectories[i])
  For j = 1 To Array.GetItemCount(files)
    TextWindow.WriteLine("    files[" + i + "] = " + files[i])
  EndFor
EndFor 

TextWindow.WriteLine("This program's file path is " + File.GetSettingsFilePath())

filePath = File.GetTemporaryFilePath()
TextWindow.WriteLine("A temporary file has been created at: " + filePath + ".")
TextWindow.WriteLine("Write to file: " + File.WriteContents(filePath, "Hello, World!"))
TextWindow.WriteLine("Write line to file: " + File.WriteLine(filePath, 15, "Hello Again, World!"))
TextWindow.WriteLine("Insert line in file: " + File.InsertLine(filePath, 20, "Hello Once Again, World!"))
TextWindow.WriteLine("Append to file: " + File.AppendContents(filePath, "Hello For the Last Time, World!"))
TextWindow.WriteLine("File contains: " + File.ReadContents(filePath))
TextWindow.WriteLine("Copy file: " + File.CopyFile(filePath, "C:\Temp\TempSubdirectory\"))

If File.LastError = "" Then
Else
  TextWindow.WriteLine("The last error was: " + File.LastError)
EndIf