Jump to content

Read File Contents


This topic is 3890 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Working on Windows 7, FMP 12, I have FM and ScriptMaster both on disk C:, I have a filemaker file on disk D:

When I give Read File Contents a path to a text (.txt) file on the Desktop ( C:) or any other path on disk C: it works fine, however, if I use a path on D:, even relative to the filemaker file (again on D:) I get the following error:

 

java.io.FileNotFoundException: file:myFile.txt (The system cannot find the file specified).

 

Also got the error with file:myFolder/myFile.txt (relative to the filemaker file) and with "file:/D:/myFolder/myFile.txt"

 

Any help would be really appreciated!

Link to comment
Share on other sites

Encoding solved (partially).

Saved the text with encode Base64 and then just used decodeBase64toText.

 

I say partially because that only works if I create the filePath as a Base64 text.

 

Would still like to know how to specify a character encoding when using ReadFileContents(filePath) when "filePath" is not generated with Base64 encoding.

Link to comment
Share on other sites

This topic is 3890 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.