Jump to content
Ultimaker Community of 3D Printing Experts

Printing GCODE file directly via Windows command line or executable

Recommended Posts


as part of a showcase installation we need a simple way how to start the printout of an existing .gcode file (previously created using the Cura application) on a UM2Go printer (connected via USB cable) via a batch script or program.

As the print should start in the background (as soon as the .gcode-file is transferred to and stored in a defined directory), we can’t use the normal Cura application.

Does anyone know of a Windows(10) executable, script or other options to start printing a .gcode-file in the way described?

Thanks in advance,


Share this post

Link to post
Share on other sites

I'm not sure what you are asking but I have 3 answers for you:

1) If you are doing a showcase printer you could print the same thing over and over and push the part off with the head.  I have done this with bracelets where one gcode file has been cut/pasted such that it prints one bracelet every 7 minutes for about 3 hours.  Also the file is named auto.g (or something similar - I forget the name you need to do) and if you power cycle the machine it starts printing again without any intervention.  This is a feature on the um2 series printers.


2) I think what you want is printrun.  With a usb cable you can print from the command line.  Also printrun comes with pronterface which is a really great interface.

Get pronterface here. It's free:


3) For about $25 or 25 euros you can buy a raspberry pi and put octoprint on it.  Octoprint will control a UM2 through a USB cable and can connect to your network and it supplies a web page.  You can do everything from the octoprint web page so you can print parts from a phone, ipad, pc, mac, whatever.  You slice and upload the gcode files to octoprint (there's an upload button) and it will store quite a few gcode files if you want.



  • Like 1

Share this post

Link to post
Share on other sites

Thanks for the answers. Indeed printrun looks like a matching solution, but unfortunately the link http://koti.kapsi.fi/~kliment/printrun/ is not active anymore (already found some information on Github or http://www.pronterface.com/ as well, but also there the same URL is used... ? ).


Octoprint or Atlasprint are no option as well, as we need a Windows based solution. We also had a look at repetier.com, but didn't find a command line option as well...


A bit more background information to explain what we are doing. Our main functionality is transferring and storing files anonymously. As part of a demo, we are transferring a .gcode file over several instances, which should be printed at the end (using a Win10 device). Therefore the print should start as soon as the .gcode file is stored in a pre-defined directory.


Share this post

Link to post
Share on other sites
44 minutes ago, Kai_Re said:

Octoprint or Atlasprint are no option as well, as we need a Windows based solution.

windows supports web browsers.


Do you mean that raspberry pi's are an illegal device to be in your company maybe?  But that seems unlikely since cell phones, paper printers, 3d printers and many other's run on non-windows.


I'm guessing you misunderstood.  You guy a raspberry pi.  It's about 25 euros.  You install octoprint on it.  Now you can print using a web page.  But maybe that's not what you want.


Share this post

Link to post
Share on other sites

It looks like printrun moved here:



Correction - no it's still at the old link.  I can see it fine.  This version is pretty new from 2017 - I think it's the most recent: http://kliment.kapsi.fi/printrun/


I believe it has a windows command line interface if you want to script something.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Our picks

    • Ultimaker Cura | a new interface
      We're not only trying to always make Ultimaker Cura better with the usual new features and improvements we build, but we're also trying to make it more pleasant to operate. The interface was the focus for the upcoming release, from which we would already like to present you the first glance. 
        • Like
      • 114 replies
    • "Back To The Future" using Generative Design & Investment Casting
      Designing for light-weight parts is becoming more important, and I’m a firm believer in the need to produce lighter weight, less over-engineered parts for the future. This is for sustainability reasons because we need to be using less raw materials and, in things like transportation, it impacts the energy usage of the product during it’s service life.
        • Like
      • 12 replies

Important Information

Welcome to the Ultimaker Community of 3D printing experts. Visit the following links to read more about our Terms of Use or our Privacy Policy. Thank you!