renku mv

Move or rename a file, a directory, or a symlink.

Description

Moving a file that belongs to a dataset will update its metadata to include its new path and commit. Moreover, tracking information in an external storage (e.g. Git LFS) will be updated.

Commands and options

renku mv

Move files and check repository for potential problems.

renku mv [OPTIONS] [SOURCES]... DESTINATION

Options

-f, --force

Override existing files.

-v, --verbose

Show move sources and destinations.

--to-dataset <to_dataset>

A target dataset to move files to.

Arguments

SOURCES

Optional argument(s)

DESTINATION

Required argument

Examples

Move operation fails if a destination already exists in the repo; use --force flag to overwrite them.

If you want to move files to another dataset use --to-dataset along with destination’s dataset name. This removes source paths from all datasets’ metadata that include them (if any) and adds them to the destination’s dataset metadata.

The following command moves data/src and README to data/dst directory and adds them to target-dataset’s metadata. If the source files belong to one or more datasets then they will be removed from their metadata.

$ renku mv data/src README data/dst --to-dataset target-dataset