Salome HOME
Adaptations for Windows
[tools/libbatch.git] / src / Core / CommunicationProtocol.cxx
index 0087063a75c2ee3d25b3708ae5993f32fa02e26e..aaee92b1c16073fb9e3e8eaef4657cc9e3cf11a8 100644 (file)
@@ -123,17 +123,29 @@ namespace Batch {
 
   string CommunicationProtocol::getRemoveSubCommand(const string & path) const
   {
+#ifdef WIN32
+    return string("del /s ") + path;
+#else
     return string("rm ") + path;
+#endif
   }
 
   string CommunicationProtocol::getRemoveDirectorySubCommand(const string & path) const
   {
+#ifdef WIN32
+    return string("rd /s /q ") + path;
+#else
     return string("rm -fR ") + path;
+#endif
   }
 
   string CommunicationProtocol::getMakeDirectorySubCommand(const string & path) const
   {
+#ifdef WIN32
+    return string("md ") + path;
+#else
     return string("mkdir -p ") + path;
+#endif
   }
 
   int CommunicationProtocol::removeFile(const std::string & path,