Posts: 15
Joined: Thu Oct 06, 2016 8:34 pm

Cannot run simple .bat script via post-processing

Mon Apr 15, 2019 10:49 am

Whats the trick to getting a simple .bat file script to execute?

I'm first trying to confirm if S3D is actually running the bat file but it clearly isn't doing anything. The bat file is simple. When its run, it creates a file called "hello.log"

This is the code
echo "hello" > hello.log

In the post processing area I added:


Nothing seems to be happening or else I'd see a file called hello.log in the output directory. This isn't the final script. I'm just testing if the bat files are executing and as of now they don't appear to be running. My real script will look something like this:

python C:\scripts\ -o %1"_fan" %1 -S

In S3D I tried executing C:\scripts\fan.bat [output_filepath] which doesn't work.

Can anyone help me out?

Posts: 237
Joined: Fri Jun 05, 2015 4:18 am

Re: Cannot run simple .bat script via post-processing

Mon Apr 29, 2019 2:59 pm

Use absolute paths, S3D probably won't set the working directory to c:\scripts for you.

Example batch:

Code: Select all

@echo off
echo Current directory is: %cd% > c:\scripts\hello.log
Output: "Current directory is: C:\Program Files\Simplify3D-4.1.2"

And if running S3D as a normal user you don't have write access to that directory. So you're basically getting an invisible "access denied" and no log file output. :)

Another way to do this would be by simply changing to the directory you want at the start of your batch file.

Return to “Troubleshooting and Bug Reports”