Skip to content

Files and folders copy command line utility replacing default 'cp' command with 'dcp' one.

License

Notifications You must be signed in to change notification settings

baterflyrity/dcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dcp

Deep copy is a command line utility for coping files and folders via python bypassing system call.

Features

  • Copies file to file, file to folder, folder to folder.
  • Records files count, size, time and speed.
  • Performs smart copying without equal files overwrite.
  • Support dry runs (without real copying).
  • Supports overwrite prompting for each file.
  • Copies empty folders.

Usage

Output from dcp --help:

Usage: dcp.py [OPTIONS] SOURCE DESTINATION

  Copy file or directory recursively from source location to destination
  location.

Arguments:
  SOURCE       Path to directory or file to copy from.  [required]
  DESTINATION  Path to directory or file to copy to. In case of copying file
               to directory it is saved into that directory.  [required]


Options:
  -b, --buffer INTEGER  In-memory buffer maximum size for reading and writing
                        files. By default system buffer size is used.
                        [default: <system value is printed>]

  -o, --overwrite       Whether to overwrite existing files. By default user
                        is prompted about each file.

  -d, --dry-run         Do not actually perform copy operation.  [default:
                        False]

  -v, --version         Print version and exit.  [default: False]
  -q, --quiet           Do not print anything to stdout, only to stderr.
                        [default: False]

  --install-completion  Install completion for the current shell.
  --show-completion     Show completion for the current shell, to copy it or
                        customize the installation.

  --help                Show this message and exit.

Why another tool?

Because I sometimes get Destination Path Too Long error when try to copy files from unix disks. Actually this is Explorer's issue that can not be fixed since 2016.


Issue tracker at github.

Built with nice CLI framework Typer.

About

Files and folders copy command line utility replacing default 'cp' command with 'dcp' one.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages