Usage of command in hostControlSafe_execute
Verfasst: 27 Apr 2016, 13:51
I would like to copy several local files on sample Windows host. I use this statement in opsi-admin:
method hostControlSafe_execute "copy C:\Path\file.exe D:\Path" host.domain.local
but it gives me an error similar to that:
"host.domain.local" :
{
"result" : null,
"error" :
{
"message" : "[Errno 1] Command '\"copy C:\\Path\\file.exe D:\\Path\"' failed (1):\nC:\\Path\\file.exe \nCan't find file",
"class" : "IOError"
}
}
What is proper way to use "\" in this statment?
method hostControlSafe_execute "copy C:\Path\file.exe D:\Path" host.domain.local
but it gives me an error similar to that:
"host.domain.local" :
{
"result" : null,
"error" :
{
"message" : "[Errno 1] Command '\"copy C:\\Path\\file.exe D:\\Path\"' failed (1):\nC:\\Path\\file.exe \nCan't find file",
"class" : "IOError"
}
}
What is proper way to use "\" in this statment?