IFile.Move

Syntax

Move(Source: String; Destination: String);

Parameters

Source - file that must be moved.

Destination - path that corresponds to the directory, into which a file must be moved.

Description

The MoveTo method moves a file into the directory passed by the Destination parameter. If the file exists, it is overwritten.

Example

Sub Main;

Begin

If File.Exists("c:\New_folder\1.txt") And Directory.Exists("c:\Temp") Then

File.Move("c:\New_folder\1.txt", "c:\Temp");

End If;

End Sub Main;

After executing the example, a file is moved to the C:\Temp folder.

See also:

IFile