# Trying to Execute a .bat file using System.util.execute()

**URL:** <https://forum.inductiveautomation.com/t/trying-to-execute-a-bat-file-using-system-util-execute/79200>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [September 15, 2023, 4:48am UTC](https://forum.inductiveautomation.com/t/trying-to-execute-a-bat-file-using-system-util-execute/79200 "2023-09-15T04:48:58Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [September 15, 2023, 7:13am UTC](https://forum.inductiveautomation.com/t/trying-to-execute-a-bat-file-using-system-util-execute/79200/3 "2023-09-15T07:13:41Z")

</div>

I think you need to escape your backslashes.  
`system.util.execute(['D:\\Reports\\file.bat'])`

See this post from earlier this week:

> [@System.util.execute() does not work when executing .bat](https://forum.inductiveautomation.com/t/system-util-execute-does-not-work-when-executing-bat/79074/6):
>
> I run a batch file like so with system.util.execute - system.util.execute(['C:\\BackupFiles\\DeleteBackup.bat']) I just call the batch directly, no preceding arguments required. This one runs on my GW as well and does similar to yours, deletes old files. What if you try it this way?

---

_[View the full topic](https://forum.inductiveautomation.com/t/trying-to-execute-a-bat-file-using-system-util-execute/79200)._
