Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
I am trying to write a CSV file using the WriteCSVFile function in ThingWorx, but I need to save the file to an external drive. In my code, I have specified the path as E:\CSV_Export_DATA\zzzNaytest.csv, but I am unsure how to set the fileRepository parameter to allow saving the file to this external drive. The function currently does not accept a file path outside of the ThingWorx platform's internal repositories.
Here is the code I’m using:
Solved! Go to Solution.
For security reasons you can't write just anywhere in the filesystem, but only to paths relative to a File Repository.
There is one location for all File Repositories, which is configurable.
On your own risk, you could try to create a symlink or hardlink in the filesystem pointing to your "destination" folder and see if that works.
Consider security, availability, robustness and performance effects. They safest version of this would be to have E:\\CSV_Export_DATA point to the TWX file repo, not the other way around.
Similar question - "Specify location for ThingworxStorage and ThingworxBackupStorage folders": https://community.ptc.com/t5/ThingWorx-Developers/specify-location-for-ThingworxStorage-and-ThingworxBackupStorage/td-p/509489
For security reasons you can't write just anywhere in the filesystem, but only to paths relative to a File Repository.
There is one location for all File Repositories, which is configurable.
On your own risk, you could try to create a symlink or hardlink in the filesystem pointing to your "destination" folder and see if that works.
Consider security, availability, robustness and performance effects. They safest version of this would be to have E:\\CSV_Export_DATA point to the TWX file repo, not the other way around.