I'd be very interested in hearing if you find something that works as I'm working on a script that I need to copy things to the clipboard. Just to be clear, it sounds like you're working on windows, correct?

While this is an ancient post, it's the most recent of various "callSystem copy to clipboard" threads. So -- here's how you can do this on Windows. My guess is that the first instance of `cmd` is closing before the output can be fed to the clipboard, but nesting it like this works just fine.