Example 2 - copy file in 2 lines

<< Click to Display Table of Contents >>

Navigation:  Introducing ThinBASIC >

Example 2 - copy file in 2 lines

 

Exactly the same as Example 1 but with only two lines of code

 

'----------------------------------------------------------------------

 

uses "file", "os"   ' Tell thinBasic you need "file" and "os" module

 

'Copy "Test.txt" file from script directory to operating system temporary directory

file_copy ( app_sourcePath & "Test.txt", os_getTempDir & "Test.txt" )