cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

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

How to Specify an External Drive Path for File Saving in ThingWorx?

TW_10599876
6-Contributor

How to Specify an External Drive Path for File Saving in ThingWorx?

 

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:

 

Resources["CSVParserFunctions"].WriteCSVFile({ path: "E:\\CSV_Export_DATA\\zzzNaytest.csv", data: Data, fileRepository: "", withHeader: false });

 

ACCEPTED SOLUTION

Accepted Solutions

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.

View solution in original post

2 REPLIES 2

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.

Announcements


Top Tags