GeoEco.DataManagement.Files.File.Move

classmethod File.Move(sourceFile, destinationFile, overwriteExisting=False)

Moves a file.

Parameters:
  • sourceFile (str) – File to move. Minimum length꞉ 1. Must exist.

  • destinationFile (str) –

    New path for the file.

    Missing directories in this path will be created if they do not exist.

    If the destination file is on the same drive or file system as the source file, the source file will simply be renamed to the destination file.

    If the destination file is on a different drive or file system, the source file will be copied to the destination file and then deleted. Minimum length꞉ 1. Must be different than sourceFile.

  • overwriteExisting (bool, optional) – If True, the destination file will be overwritten, if it exists. If False, a ValueError will be raised if the destination file exists.