vifs command-specific options allow you to retrieve and upload files from the remote host and perform a number of other operations.

All vifs options work on datastore files or directories. Some options also work on host files and files in the temp directory. You must also specify connection options.

Command Description Target Syntax

--copy

-c <source> <target>

Copies a file in a datastore to another location in a datastore. The <source> must be a remote source path, the <target> a remote target path or directory.

The --force option replaces existing destination files.

Datastore Temp

copy src_file_path dst_directory_path [--force]

copy src_file_path dst_file_path [--force]

--dir

-D <remote_dir>

Lists the contents of a datastore directory. Datastore Temp dir datastore_directory_path

--force

-F

Overwrites the destination file. Used with --move and --copy. Datastore Temp copy src_file_path dst_file_path [--force]

--get

-g <remote_path> <local_path>

Downloads a file from the ESXi host to the machine on which you run vCLI. This operation uses HTTP GET. Datastore Host

get src_dstore_file_path dst_local_file_path

get src_d store_dir_path dst_local_file_path

--listdc

-C

Lists the data center paths available on an ESXi system. Datastore Host

--listds

-S

Lists the datastore names on the ESXi system. When multiple data centers are available, use the --dc (-Z) argument to specify the name of the data center from which you want to list the datastore. Datastore Host vifs --listds

--mkdir

-M <remote_dir>

Creates a directory in a datastore. This operation fails if the parent directory of dst_datastore_file_path does not exist. Datastore Temp mkdir dst_directory_path

--move

-m <source> <target>

Moves a file in a datastore to another location in a datastore. The <source> must be a remote source path, the <target> a remote target path or directory.

The --force option replaces existing destination files.

Datastore Temp

move src_file_path dst_directory_path [--force]

move src_file_path dst_file_path [--force]

--put

-p <local_path>

<remote_path>

Uploads a file from the machine on which you run vCLI to the ESXi host. This operation uses HTTP PUT.

This command can replace existing host files but cannot create new files.

Datastore Host Temp

put src_local_file_path dst_file_path

put src_local_file_path dst_directory_path

--rm

-r <remote_path>

Deletes a datastore file. Datastore Temp rm dst_file_path

--rmdir

-R <remote_dir>

Deletes a datastore directory. This operation fails if the directory is not empty. Datastore Temp rmdir dst_directory_path