cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Register for our Discovery Summit 2024 conference, Oct. 21-24, where you’ll learn, connect, and be inspired.
Choose Language Hide Translation Bar

Cannot save text file, "Unable to open in ReadWrite mode"

Hello, I have a text file in a Sharepoint which I want to read, make changes to and then save back to its original location. I am able to open and make changes to it, but whenever I try to save it I get an error saying:

 

"Unable to open in ReadWrite mode.
The filename, directory name, or volume label syntax is incorrect."

 

I'm using the same file path for loading and saving the text file, but only loading works. I have also tried saving the file locally and it works, so it is not an issue with the file. Here is my code (JMP 17.0):

 

 

Names Default To Here( 1 );

// load rule data
rules_path = file path in sharepoint
rules = Load Text File(rules_path, JSON);

Save Text File(rules_path, As JSON Expr(rules));

 

1 ACCEPTED SOLUTION

Accepted Solutions
mmarchandFSLR
Level III

Re: Cannot save text file, "Unable to open in ReadWrite mode"

Is the file path a web address (https://...)?  If so, that's the issue.  In Windows, if you can view the SP folder in File Explorer, right click on the file and "Copy as path."  That will give you the path you need.  It will start with "\\" like a network drive.

View solution in original post

2 REPLIES 2
mmarchandFSLR
Level III

Re: Cannot save text file, "Unable to open in ReadWrite mode"

Is the file path a web address (https://...)?  If so, that's the issue.  In Windows, if you can view the SP folder in File Explorer, right click on the file and "Copy as path."  That will give you the path you need.  It will start with "\\" like a network drive.

Re: Cannot save text file, "Unable to open in ReadWrite mode"

That worked, thank you! I just deleted the 'https:' and kept the rest of the path.