Giter Club home page Giter Club logo

robocopyps's Introduction

RobocopyPS

Build status

Description

RobocopyPS is a PowerShell module with the intention to be a wrapper for Robocopy.exe and output Robocopys information to PowerShell streams (Verbose, Error etc).

RobocopyPS only works if the language is set to en-US. This is because we look at each line of output from Robocopy and make a decision on what stream to use. If the language is not english we are not sure what to do.

If we do not know what stream to output to we use the Information stream, so if you are missing output try and run with -InformationAction Continue

You can use all Robocopys native parameters like -e, -mir etc but we try and translate them to easier parameter names as -Recurse and -Mirror instead.

Installation

The easiest way to get RobocopyPS is using the PowerShell Gallery!

Install-Module -Name RobocopyPS

Usage

Invoke-Robocopy

Invoke-RoboCopy is the core function used by RobocopyPS and will contain all parameters that can be used with Robocopy.exe. Most, if not all, other functions will call Invoke-RoboCopy.

Copy all items from C:\tmp\from\ to C:\tmp\to\. Include subdirectories that is empty and create a log file at C:\tmp\log.log

Invoke-RoboCopy -Source C:\tmp\from\ -Destination C:\tmp\to\ -IncludeEmptySubDirectories -LogFile C:\tmp\log.log

Move all items from C:\tmp\from\ to C:\tmp\to\. Note that this will remove C:\tmp\from\ when Robocopy is done

Invoke-RoboCopy -Source C:\tmp\from\ -Destination C:\tmp\to\ -MoveFilesAndDirectories

Other functions

Other functions are usually using Invoke-Robocopy under the hood but exist for convenience for the user to easier understand what the specific function does.

Copy-RoboItem

Copy items from one directory to another, including empty subdirectories. Using -Force will create the destination folder if it does not exist.

Copy-RoboItem -Source C:\tmp\from\ -Destination C:\tmp\to\ -IncludeEmptySubDirectories -Force

Get-RoboItem

List information about a directory, including file count and total folder size, and using -Unit will show the size in bytes.

Get-RoboItem -Path C:\tmp\from\ -Unit Bytes

Move-RoboItem

Move D:\tmp\from to destination D:\tmp\to.

Move-RoboItem -Source D:\tmp\from\ -Destination D:\tmp\to

Remove-RoboItem

Remove multiple directories.

Remove-RoboItem -Path "D:\dir1","D:\dir2"

Release History

A detailed release history is contained in the Change Log.

License

RobocopyPS is provided under the MIT license.

robocopyps's People

Contributors

fjollberg avatar maxxattaxx avatar sbergwall avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.