now I have a workaround, but it ist ugly!!! Because now I have an output I don't want and I cannot examine this output as I wanted: I can execute the xcopy like this system( "cmd.exe", "/c", "xcopy /s /e #{sourceroot}*.* #{targetdirectory}" )