Skip to content

andrewlader/go-copy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

241 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-copy

Category Badges
Project Information GitHub Release GitHub go.mod Go version
Testing Scrutinizer coverage (GitHub/Bitbucket) with branch
Branch GitHub branch check runs
License GitHub License
Purpose Static Badge

Description

This command-line tool can copy files from a source directory to one or more destinations. It is easily configured, and can run on Windows, Linux and Mac (Intel and RISC). It's simple to install, and easy to use.

Installation

There are a couple of ways to install go-copy.

1. If you have Go installed

go get https://github.com/andrewlader/go-copy.git

2. Download and Install the Executable

Download the desired binary from the releases page

Configuration File

A configuration file is required for go-copy to define which files or folders to copy, where to copy them, and how to handle replacements. The config file is written in YAML format and can be placed in either the configs/ directory or your user directory (e.g., C:\Users\<username>\.go-copy\go-copy-config.yaml).

Format

Each operation is defined as a YAML key, with the following structure:

<operation_name>:
  name: <Display Name>
  source: <Source Path>
  destinations:
    - <Destination Path 1>
    - <Destination Path 2>
  replace: <replace mode>

Example

borderlands3:
  name: Borderlands 3
  source: C:\Users\john\Documents\My Games\Borderlands 3\Saved
  destinations:
    - D:\Game Saves\Borderlands 3 Backup
    - E:\More Game Saves\Borderlands 3 Backup
  replace: skip

oblivion:
  name: Oblivion Remastered
  source: C:\Users\john\Documents\My Games\Oblivion Remastered\Saved\SaveGames
  destinations:
    - D:\Game Saves\Oblivion Remastered Backup
    - E:\More Game Saves\Oblivion Remastered Backup
  replace: always

Instructions for New Users

  1. Create a file named go-copy-config.yaml in either the configs/ directory or your user directory (e.g., C:\Users\<username>\.go-copy) if you are using Windows. The best location for the configuration file is dependent on the OS. Consult documentation for the most appropriate location.
  2. For each backup operation, add a section as shown above.
    • name: A friendly name for the operation.
    • source: The folder or file to copy.
    • destinations: One or more backup locations.
    • replace: How to handle existing files (never, skip, always).
  3. Replace modes:
    • never - copy over new files, but never replace existing files
    • skip - skip files that match the date and size of the backed up file
    • always - always copy, replacing the existing backup files if they exist
  4. Save the file and run go-copy --operation <operation_name> to execute the copy.
  5. You can add multiple operations for different games, projects, or folders.

For more details, see the sample config in your user directory or configs/go-copy-config.yaml.

Usage

go-copy --operation <operation-name> ...<other options>

Building a New Release

  1. Push new branch
  2. Merge branch
  3. If tests succeed, then create a new tage (v#.#.#)
  4. After creating new tag, click on New Release

Contributing

Currently not accepting contributions.

Authors and acknowledgment

Show your appreciation to those who have contributed to the project.

About

Copies files recursively from a source location to one or more destinations

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors