Quote from FGdesign on March 4, 2023, 11:23 amGreetings.
I would like to know if there is a way to use Fileread and Filewrite functions on an external file, perhaps on a NAS (maybe FTP) or a computer behind NAT (public ip+port forwarded to pc’s ip).
thanks
Greetings.
I would like to know if there is a way to use Fileread and Filewrite functions on an external file, perhaps on a NAS (maybe FTP) or a computer behind NAT (public ip+port forwarded to pc’s ip).
thanks

Quote from fkapnist on March 4, 2023, 12:55 pmQuote from FGdesign on March 4, 2023, 11:23 amGreetings.
I would like to know if there is a way to use Fileread and Filewrite functions on an external file, perhaps on a NAS (maybe FTP) or a computer behind NAT (public ip+port forwarded to pc’s ip).
thanks
I got this answer from GPT 3:
Yes, it is possible to use Fileread and Filewrite functions on external files stored on a NAS or on a computer behind NAT. To do so, you need to use a network protocol such as FTP, SFTP, or SMB. Depending on the type of protocol you use, you may need to provide credentials to access the remote file. Once you have established a connection with the remote file, you can use Fileread and Filewrite functions as normal..
Quote from FGdesign on March 4, 2023, 11:23 amGreetings.
I would like to know if there is a way to use Fileread and Filewrite functions on an external file, perhaps on a NAS (maybe FTP) or a computer behind NAT (public ip+port forwarded to pc’s ip).
thanks
I got this answer from GPT 3:
Yes, it is possible to use Fileread and Filewrite functions on external files stored on a NAS or on a computer behind NAT. To do so, you need to use a network protocol such as FTP, SFTP, or SMB. Depending on the type of protocol you use, you may need to provide credentials to access the remote file. Once you have established a connection with the remote file, you can use Fileread and Filewrite functions as normal.
.

Quote from fkapnist on March 4, 2023, 2:08 pmQuote from FGdesign on March 4, 2023, 1:22 pmThanks, could you provide me with the exact syntax to do so?
You can use the Fileread and Filewrite functions in VisualNEO Win to read and write to remote files. The syntax for Fileread is as follows: Fileread(sFileName, sMode, sProtocol, sUsername, sPassword) The parameters are as follows: sFileName: The complete path and filename of the remote file. sMode: The file access mode, either "r" (read only) or "w" (write). sProtocol: The network protocol to use. Valid options are "ftp", "sftp", or "smb". sUsername: The username for the remote file. sPassword: The password for the remote file. The syntax for Filewrite is as follows: Filewrite(sFileName, sMode, sProtocol, sUsername, sPassword, sData) The parameters are as follows: sFileName: The complete path and filename of the remote file. sMode: The file access mode, either "a" (append) or "w" (write). sProtocol: The network protocol to use
Quote from FGdesign on March 4, 2023, 1:22 pmThanks, could you provide me with the exact syntax to do so?
You can use the Fileread and Filewrite functions in VisualNEO Win to read and write to remote files. The syntax for Fileread is as follows: Fileread(sFileName, sMode, sProtocol, sUsername, sPassword) The parameters are as follows: sFileName: The complete path and filename of the remote file. sMode: The file access mode, either "r" (read only) or "w" (write). sProtocol: The network protocol to use. Valid options are "ftp", "sftp", or "smb". sUsername: The username for the remote file. sPassword: The password for the remote file. The syntax for Filewrite is as follows: Filewrite(sFileName, sMode, sProtocol, sUsername, sPassword, sData) The parameters are as follows: sFileName: The complete path and filename of the remote file. sMode: The file access mode, either "a" (append) or "w" (write). sProtocol: The network protocol to use
Quote from FGdesign on March 4, 2023, 4:21 pmThanks, although I’m using the old Neobook 5, where actual syntax is Fileread “path” “line” “[variable]”
Thanks, although I’m using the old Neobook 5, where actual syntax is Fileread “path” “line” “[variable]”

Quote from fkapnist on March 4, 2023, 4:33 pmQuote from FGdesign on March 4, 2023, 4:21 pmThanks, although I’m using the old Neobook 5, where actual syntax is Fileread “path” “line” “[variable]”
It is the same syntax for VisualNEO Win. I have been told by @luishp that GPT 3 often gives wrong answers.
So it is yet not completely reliable when it comes to writing code. Maybe a VB script function would do what you require.
Sorry.
Quote from FGdesign on March 4, 2023, 4:21 pmThanks, although I’m using the old Neobook 5, where actual syntax is Fileread “path” “line” “[variable]”
It is the same syntax for VisualNEO Win. I have been told by @luishp that GPT 3 often gives wrong answers.
So it is yet not completely reliable when it comes to writing code. Maybe a VB script function would do what you require.
Sorry.
Quote from FGdesign on March 4, 2023, 5:08 pmMy syntax looks like this image. I just want to edit/read a file on another pc, whatever protocol or NAT it requires.
It's the old Neobook 5, not Visual Neo though.
Thanks
My syntax looks like this image. I just want to edit/read a file on another pc, whatever protocol or NAT it requires.
It's the old Neobook 5, not Visual Neo though.
Thanks
Uploaded files:
Quote from fkapnist on March 4, 2023, 6:12 pmQuote from FGdesign on March 4, 2023, 5:08 pmMy syntax looks like this image. I just want to edit/read a file on another pc, whatever protocol or NAT it requires.
It's the old Neobook 5, not Visual Neo though.
Thanks
Neobook has these actions:
Internet > HTTP >
InternetFileExists "http://www." "" ""
InternetGet "" "" ""
InternetPost "" "" "" ""But for more control, try using the NeoFM-FTP plugin:
https://visualneo.com/product/neofm-ftp
.
Welcome to NeoFM/FTP (visualneo.com)
.
asFTP - VisualNEO. Cross-platform App Development Tool for Windows
.
Quote from FGdesign on March 4, 2023, 5:08 pmMy syntax looks like this image. I just want to edit/read a file on another pc, whatever protocol or NAT it requires.
It's the old Neobook 5, not Visual Neo though.
Thanks
Neobook has these actions:
Internet > HTTP >
InternetFileExists "http://www." "" ""
InternetGet "" "" ""
InternetPost "" "" "" ""
But for more control, try using the NeoFM-FTP plugin:
https://visualneo.com/product/neofm-ftp
.
Welcome to NeoFM/FTP (visualneo.com)
.
asFTP - VisualNEO. Cross-platform App Development Tool for Windows
.