Jump to content

Calling windows batch file or external tool from script?


Recommended Posts


I'm wondering if there's a way with stock engine code to call a windows batch file (.bat) or an external tool executable? The main reason I'm asking for that is that I want to delete files from torqueScript, is there a built-in way to do it that I'm not aware of?

Even if there's a torque way to do it, I'd still like to know if it's possible to call external .bat or .exe?

Link to comment
Share on other sites

  • 3 weeks later...

function shellExecute( (string executable, string args, string directory) )

@brief Launches an outside executable or batch file

@param executable Name of the executable or batch file

@param args Optional list of arguments, in string format, to pass to the


@param directory Optional string containing path to output or shell

@ingroup Platform


But you can also just use fileDelete("file.cs").

Edit: also, this might be of interest: http://wiki.torque3d.org/introduction:generating-the-engine-and-script-documentation (created it just now).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...