#!/usr/bin/perl -i use strict; use warnings; use File::Basename; use Win32; my $fname = $ARGV[0]; my ($name, $path, $suffix1) = fileparse($fname, qr’\.[^\.]*'); my $shortname = "$name$suffix1"; my $shortpath = Win32::GetShortPathName($path); exec "c:/Slic3r/gpx-win32-1.3/gpx.exe" -g -p -m r1d $shortpath$shortname "C:/Slic3r/Output Files/$name.x3g"