Remote access to USB drive - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8) +--- Thread: Remote access to USB drive (/showthread.php?tid=2896) |
Remote access to USB drive - tassiebean - 10.10.2020 Hi, I can write to a USB drive, then unplug it and read the contents on another computer. However, Is there a way to reads the USB drive contents remotely? I was thinking to FTP in via the apps' credentials, and this allows me to see the /user directory. I can see files I have put into that directory via previous FTP sessions. However, can I FTP my way to the USB contents? Or, as second best, how to write the code to copy a file from the USB dive to the /user directory, which I can then retrieve via FTP. I have been playing with the following code: Code: -- Write a test USB stick file The first lot of code works and creates the 12 line file on the USB stick. The other os.execute commands either work or don't work as shown. Am I heading down the right path? So, my questions summarised: 1) Can we reach the USB drive directly via FTP? 2) Failing that, can we copy files from the USB drive to the /user directory? Thanks! RE: Remote access to USB drive - Erwin van der Zwart - 10.10.2020 No, that is not possible, but you can write your file directly to the ftp See this sample: https://openrb.com/example-export-last-hour-csv-object-log-file-to-external-ftp-server-from-lm2/ RE: Remote access to USB drive - tassiebean - 10.10.2020 Thanks, Erwin. There's a lot of examples and ideas there! RE: Remote access to USB drive - admin - 12.10.2020 This is possible, you just need to mount the USB drive correctly. Note that example uses paths for ftp username, not apps. If using this approach you only need to mount USB drive once and do not unmount it after writing. Code: -- create directory. |