DIAdem API Reference

Command: FileCopy

  • Updated2023-02-21
  • 3 minute(s) read

Display all  Hide all

Copies files.

Call FileCopy(FSSourceName, FSTargetPath, [FSProgressBar])

Input Parameters

FSSourceName Specifies the source file or source folder for DIAdem file and folder commands.
FSTargetPath Specifies target folders for DIAdem file and folder commands.
[FSProgressBar] Specifies whether the progress bar, which the operating system displays during long operations, is visible. If you assign the value TRUE to the FSProgressBar variable, DIAdem does not display the progress bar. The default value for the FSProgressBar variable is FALSE.
Note  If the target file is read-only, DIAdem cannot copy the file.
Note  DIAdem aborts the FileCopy command as soon as an error occurs. DIAdem does not undo previous changes.
Note  To copy .tdm, .tdms and .dat type DIAdem files and the associated binary files, which contain the bulk data, use the DataFileCopy command.

Examples

The following example copies the Source.txt file from drive C:\ to drive D:\ and renames the file Target.txt.

VBScriptPython

 

Call FileCopy("C:\Source.txt","D:\Target.txt")

The following example copies all files called Source, such as Source.txt, Source.vbs or Source.log, to the D:\Target folder.

VBScriptPython

 

Call FileCopy("C:\Source\Source.*","D:\Target\")

Related Topics

Command: DataFileDelete | Command: DataFileLstGet | Command: DataFileMove | Command: DataFileRename | Command: DirLstWrite | Command: FileAttrClear | Command: FileAttrSet | Command: FileClose | Command: FileCloseAll | Command: FileDateSet | Command: FileDelete | Command: FileMove | Command: FileOpen | Command: FileRename | Function: DataFileSize