Phantom Documentation

[Help Home] [Phantom Home]
CopyDir

bool CopyDir(string,string)

Return Type: bool
Parameters: string Source,string Dest

Description:
CopyFile copies the contents of a directory indicated by Source to a new location directory indicated by Dest. Both Source and Dest can be either absolute paths or partial paths. The return value is true if the copy is successful, false otherwise.

The files to be copied can be filtered to contain only certain files. For example:
CopyDir("c:\\windows\\*.txt", “c:\\”) copies all text (.txt) files.


Example Code
string sSrc = "c:\\files\\*.bat";
string sDest = "c:\\backup"
bool b = CopyDir(sSrc, sDest);
if(b == false){
  disp("Copy Unsuccessful");
}





Copyright 2000-2011 Phantom Automated Solutions