3

Can I run a Windows command, and pass arguments to it, over cygwin?

Specifically I would like to have a bash script that runs Robocopy, but the question is general.

Robocopy is more suitable for my needs than rsync, but batch scripting is capricious. PowerShell seems interesting but I'd rather not learn a new language if possible, besides bash is very convenient.

I couldn't find any mention about it.

Thanks

1
  • yes, you can run them. Put just attention to correct escape, if needed. – matzeri Jan 29 '17 at 13:13
4

You can run Windows commands by nesting cmd.exe from your Cygwin shell. Launch cmd.exe with /C option and the command in quotes:

 cmd /C "do_stuff.exe"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.