diff --git a/setup/cli/modules/deploy.php b/setup/cli/modules/deploy.php
index f402e99e2fb355159983473232f6e6f8b710e8b8..7d0e87ecc21b86cb596e2b20067028a9f8ba7171 100644
--- a/setup/cli/modules/deploy.php
+++ b/setup/cli/modules/deploy.php
@@ -151,11 +151,12 @@ class Deployment extends Unpacker {
 
         # Locate the upload folder
         $root = $this->find_root_folder();
+        $rootPattern = str_replace("\\","\\\\", $root); //need for windows case
 
-        $exclusions = array("$root/include", "$root/.git*",
+        $exclusions = array("$rootPattern/include", "$rootPattern/.git*",
             "*.sw[a-z]","*.md", "*.txt");
         if (!$options['setup'])
-            $exclusions[] = "$root/setup";
+            $exclusions[] = "$rootPattern/setup";
 
         # Unpack everything but the include/ folder
         $this->unpackage("$root/{,.}*", $this->destination, -1,