GeoEco.DataManagement.Files.File.CopyTable

classmethod File.CopyTable(table, sourceFileField, destinationFileField, where=None, orderBy=None, skipExisting=False, overwriteExisting=False, basePath=None)

Copies the files listed in a table.

Parameters:
  • table (Table) – Table to query.

  • sourceFileField (str) – Field containing the paths of the files to copy. Minimum length꞉ 1.

  • destinationFileField (str) – Field containing the paths of the destination files. Minimum length꞉ 1.

  • where (str, optional) –

    SQL WHERE clause expression that specifies the rows to include. If not provided, all of the rows will be included. If provided but the underlying storage format does not support WHERE clauses, an exception will be raised.

    The exact syntax of this expression depends on the underlying storage format. If the underlying data store will be accessed through ArcGIS, this article may document some of the possible syntax, but not all of it may be supported through ArcGIS’s underlying Python API.

    Minimum length꞉ 1.

  • orderBy (str, optional) –

    SQL ORDER BY clause that specifies the order in which the rows should be accessed. If not provided, the rows will accessed according to the default behavior of the underlying storage format and the programming library used to access it.

    The ORDER BY clause must be a comma-separated list of fields. Each field can optionally be followed by a space and the word ASC to indicate ascending order or DESC to indicate descending order. If neither is specified, ASC is assumed.

    The underlying storage format and library perform the actual evaluation of this parameter and determine the rules of sorting, such as whether string comparisons are case-sensitive or case-insensitive. At present, there is no mechanism to interrogate or manipulate these rules; you must live with the default behavior of the underlying format and library.

    Minimum length꞉ 1. Must match regular expression꞉ \s*\S+(\s+([aA][sS][cC]|[dD][eE][sS][cC]))?\s*(,\s*\S+(\s+([aA][sS][cC]|[dD][eE][sS][cC]))?\s*)*.

  • skipExisting (bool, optional) – If True, copying will be skipped for destination files that already exist.

  • overwriteExisting (bool, optional) – If True and skipExisting is False, existing destination files will be overwritten.

  • basePath (str, optional) –

    Base path to prepend to relative paths.

    If any of the input paths (or output paths, if this method has outputs) obtained from the table are relative paths, they will be converted to absolute paths prior to processing, as follows:

    • If a base path is provided, it will be prepended to the relative path.

    • Otherwise, if the ArcGIS geoprocessor has been initialized and the geoprocessing workspace has been set (i.e. the Workspace property of the geoprocessor is not empty), it will be prepended to the relative path.

    • Otherwise, the current working directory for the executing process will be prepended to the path. If you have not explicitly changed the working directory, it is usually the directory that contains the Python interpreter (e.g., on Windows computers, it would be C:\Python24, if yo’re running Python 2.4).

    Minimum length꞉ 1.