File backup : PowerShell and Robocopy

The PowerShell here just wraps the RoboCopy functionality. Code.

psrobocopy01

But if you just want to keep it real simple, for a basic do-it-all backup, do this…

Robocopy.exe c:\temp d:\tempxxx /E

, where c:\temp is the root/source directory to copy, including subfolders, d:\tempxxx is the target directory, which does not need to exist when you execute the copy, and /E says “also create any empty folders you find in the source.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s