Reputation: 459
I am using Buildbot 2.4.0 and I need to copy files from one folder on the worker to another folder on the same worker, just copying files around. I am struggling to use xcopy, basically it does not work.
from buildbot.plugins import steps
f.addStep(steps.ShellCommand(command=["cmd.exe /k", "xcopy Y:\sourcefile\j93n.exe Y:\dest\folder"],
workdir="build/directory"))
Does anyone have a working example of how I can use xcopy to copy files around on the worker? Is this the correct way to call xcopy. I'm using Windows
Regards
Upvotes: 0
Views: 43
Reputation: 1300
f.addStep(steps.ShellCommand(command=["cmd.exe /k", "xcopy Y:\sourcefile\j93n.exe Y:\dest\folder\"],
workdir="build/directory"))
since the destination is a folder, you should add a backslash at the end. I don't know hot to escape in Buildbot worker, but if you know the escape char you can use it to enclose both source and destination in double quotes. For example:
f.addStep(steps.ShellCommand(command=["cmd.exe /k", "xcopy \"Y:\sourcefile\j93n.exe\" \"Y:\dest\folder\\""],
workdir="build/directory"))
But... if backslash is the escape char, then the problem is another... The paths should have been written differently.
Upvotes: 0