I was wondering what are some ways that I can use SelectFolder to select a folder on a different computer than the one running my app? I know how to create client/server tcp socket apps but how can you use SelectFolder on machine A that is connected to machine B via a tcp socket to get a list of folders to select from on machine B? Any tips or advice would be appreciated!
Unless that machine has a share that you can mount you cant use SelectFolder (or any other folderitem operations)
Folderitems require a file system which a TCP connection isn’t
Ok thanks for the reply. Is there any other way you know of to accomplish this with Xojo?
I don’t think you want that capability. If Machine B is not configured to share with Machine A, but Machine A could access B anyway, so could everyone else.
Well I was going to secure it with a password to connect to machine B and ultimately encrypt the communication in both directions.
I dont think any programming language lets you arbitrarily get at the file system of a machine the way you’re asking for
If you want to get a FolderItem then you need access to the file system
Or write a small “server” app for machineB that machine A can connect to
And you’ll have to have an entire protocol for the app on machineA to talk to the app on machineB so the one on machine A can ask about what files , directories etc - which is about what mounting a share on the other machine does
Thanks Norman. I’ve pretty much come to the same conclusion that being able to browse a list of folders on the remote computer will be 10 times more work than the main functionality of my program. I am currently messing around with some c# code to see how hard it will be to browse for remote folders. I can almost get at C$ using some code I’m working on but I need to learn how to do some kind of user impersonation to get access remotely. All this just so the user can easily return a string with a folder path from a remote computer without having to type it in manually.
you can not count on c$ being there nor that you have access to it. At the day job, the C$ is only accessible by our domain administrators. Even local administrators dont have access to it. And on some laptops C$ doesnt exist (hint: mine). So be careful how you go down that path.
This is one of the problems that is on my to-do list for the server version of my app. Unfortunately, selecting a folder works for my 2 computers. Do I turn off sharing between the computers to get a proper network?
Thanks for the advice. I was just using C$ as an example to explain the solution I was working on at the time.
I was wrong about a Xojo solution taking a lot of time. @Norman Palardy is right just use your server app (machine B) and create protocols to handle the remote drive information you need. It only took me a couple hours last night to create this locally on machine A using folderitem and a listbox. I can now just add this code to my server app on machine B and use my client app on machine A to request the drive information from machine B.
I used this code to get the initial drive information:
Dim i,n as integer
Dim intChk As integer
for i = 0 to n