[FileSystem] FileSystem - Creating a local file

Forge Component
Published on 2018-11-28 by Matthias Preuter
25 votes
Published on 2018-11-28 by Matthias Preuter
I am using the File_WriteText action.

I put a populated record list of type "Line" in the lines parameter.
I put "C:\myfolder\myfile.txt" in the path parameter.
I put "ASCII" in the encoding parameter.

File_WriteText created C:\myfolder\myfile.txt on the OutSystems server. Created the folder, too.

I want it to write to the C: drive of my client. How do I do that?

You can't :)

Let me explain why. You are processing the request on the server side and you don't have access to the client's machine. The security model won't even allow you to do this in javascript on the client side.

Your best bet is to use the Download widget.

hey Alan,
could you please detail out the process of creating the file. i am new in outsystems and got stuck in achiveing this functionality.

I got stuck too. As André said, File_WriteText can't write to the client's local drive. I ended up writing to a shared folder. Shortly after that, my project was cancelled and I abandoned the whole thing.

I'm sorry that I'm not much help.