This documentation was styled with a demo skin from the Premium Pack 4 add-on for Help & Manual. The contents of the skin are encrypted and not configurable. You can only publish HM projects with this skin. You cannot edit it or change it.
This version is copyright and may only be used for local testing purposes. It may not be distributed.
Please purchase the full version of the Premium Pack to get the configurable skins and remove this notice. The package will also include the Toolbox configuration utility for Premium Pack skins.
This script will copy a file into a Windows temporary directory. This is a simple 4 line script.
All lines of code are outside any "user defined function" so this code will be executed immediately.
'----------------------------------------------------------------------
uses "file", "os" ' Tell thinBasic you need "file" and "os" module
' Define a string variable containing the name of the file to copy FROM.
' Function app_sourcePath returns the path of the running script
dim fileSource as string = app_sourcePath & "Test.txt"
' Define a string variable containing the name of the file to copy TO.
' Note the alternative short form of variable declaration.
' Function os_getTempDir returns the path of the Temporary directory defined in your OS environment
string fileDest = os_getTempDir & "Test.txt"
'Copy the file into the new location with
file_copy (fileSource, fileDest)