Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am running a CMS website using PyroCMS on my Windows machine. I am serving up the pages from my localhost using WampServer.

I have two separate directories:

Development: C:\Users\me\development\ContentSite\

Live (Wamp root dir): C:\wamp\www\

I am developing my PyroCMS theme in the development directory, which has the same directory structure as it would when deployed to the Wamp WWW root.

What is the best way to make a fast deployment script? Essentially it would just need to wipe out the current contents of the Wamp www root directory and replace it with what I have in development. I came up with this script using PowerShell:

$from = "C:\Users\me\development\ContentSite\*"
$to = "C:\wamp\www"
Copy-Item $from $to -recurse -force

But it is pretty slow. Any better ideas?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Try using ROBOCOPY "C:\Users\me\development\ContentSite\" "C:\wamp\www" /mir instead. This will only copy changed files.

For more info on robocopy: http://ss64.com/nt/robocopy.html

Also take a peak at this question: http://stackoverflow.com/questions/677789/powershell-copy-item-but-only-copy-changed-files

share|improve this answer
    
Good stuff. I had forgotten all about ROBOCOPY. This works well. –  mhornfeck Feb 19 '13 at 1:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.