RENAMECOPY$ renames or copies a file

Syntax

RENAMECOPY$(SourceFile$, TargetFile$, Result$, IntMode=0,1 , [InpVar])

Arguments

  • Sourcefile$ is a string containing the name and extension of the file to be renamed or copied. When no path is given, the system will look in the current path for "Reports, Projects and Temporary files"
  • TargetFile$ is a string containing the new name for the renamed file or the copy
  • Result$ is the string that the function RENAMECOPY$ will return. When Result$="NullString" the function returns TargetFile$
  • IntMode% is the mode of the function: 
    • For IntMode=0 the file is renamed. 
    • For IntMode=1 the file is copied.
  • [InpVar] are optional arguments containing parameters that need to be known before the function is executed. This can be used to force the system to calculate these parameters before renaming or copying the file.

Examples

RENAMECOPY$("test.txt", "new_test.txt", "Nullstring", 0)

Renames the file test.txt into new_test.txt and returns "new_test.txt" as string output.


RENAMECOPY$("test.txt", "copy_of_test.txt", "Copy created", 1)

Makes a copy named copy_of_test.txt of the file test.txt and returns "Copy created" as string output.


RENAMECOPY$("test.txt", "copy_of_test.txt", "Copy created", 1, LPP, B)

Makes a copy named copy_of_test.txt of the file test.txt and returns "Copy created" as string output, but not until both the parameters LPP and B are known.


 

Quick links: Functions overview | Attribute overview | Constants overview | Dimensions overview

  • No labels