DIAdem Help

Method: MoveFile for FileSystemObject

  • Updated2024-09-12
  • 1 minute(s) read

Method: MoveFile for FileSystemObject

Moves one or more files.

Object.MoveFile(Source, Destination)
ObjectFileSystemObject
Object with this method
SourceString
Specifies the path of the files that you want to move. The path may contain wildcards in the last path component. If the source contains wildcards, the target path must lead to an existing folder.
DestinationString
Specifies the path of the target folder to which DIAdem copies the source file. The path of the target folder must not contain wildcards.
Note  The MoveFile method aborts as soon as the first error occurs. DIAdem does not undo changes made to the file system before an error occurred.

The following example moves all TDR files from C:\Examples\Documents folder to the C:\Temp folder:

Sub MoveFiles(sSource,sTarget)
  Dim fso
  Set fso = CreateObject("Scripting.FileSystemObject")
  Call fso.MoveFile(sSource,sTarget)
End Sub
Call MoveFiles("C:\Examples\Documents\*.tdr", "c:\Temp")

See Also

Objects Overview

Log in to get a better experience