Exporting UDT on Linux Error

I'm trying to export a udt on a Linux system and keeps flagging that it cannot create the file, although the file already exists.

Here's the script I'm using:

Use double forward slashes for the root on Linux

filePath = "/home/user/udts/test.json"
tagPaths = ["[default]_types_/PlantInfo/Plant_Info"]

system.tag.exportTags(
filePath = filePath,
tagPaths = tagPaths
)

And the error I'm getting:

java.io.IOException: java.io.IOException: Cannot create directory '\home\user\udts'

Thank you in advance.

Where are you running this code? Which system is the Linux system, yours or the one running the Gateway?

I'm running this code on the console, and the gateway OS is Linux

The script console executes code on whatever computer is running the Designer, not on the Gateway, so unless you're also running on Linux that path is not valid.

Got it! I'll put it to run on the gateway on Monday, and see how that goes. Thank you for your fast response Kevin!