Accessing files on a local network file server - BEST PRACTICE?
bdrunrev at gmail.com
Fri Sep 25 04:10:00 EDT 2020
So that in case (1) , we regenerate the file and in case (2) we present
a warning that the server is disconnected or down?
For (2) you could save an empty file (as a flag of availability) and set
it's attribute to hidden.
If the file is not there when you get the files, then the folder is
unavailable. Because it's a hidden file, users won't see it if they open
the folder using (most) other applications (Explorer only shows such files
if the 'show hidden' checkbox is ticked).
This file can then be filtered out based on file name when you get the
files of that folder to present to the user. It's just your internal check
for folder availability. I guess there are some "net use" commands that
would show which shares are available/unavailable, but it's a long time
since I did that kind of system admin.
To programmatically set a file attribute to hidden on Windows use the shell
command to issue this "attrib +h _ServerAvailable.txt"
Hope that helps.
On Thu, Sep 24, 2020 at 9:54 PM Paul Dupuis via use-livecode <
use-livecode at lists.runrev.com> wrote:
> This question may have an obvious answer, but I am brain dead today, so
> here goes:
> I have a app installed with some customers in a Windows network
> environment. They have all their laptops set so that their Home
> directories are on a local network server.
> So, where as on a local laptop, specialFolderPath("documents") might
> return "C:/Users/<username>/Documents" as the path, for them
> specialFolderPath("documents") returns something like
> We save a number of folders and files in the user's Documents folder. In
> some cases, if the file is not present (i.e. if there is a file tFile is
> false) we regenerate the file from a default.
> Sometime, the server is offline or the user is disconnected from the
> What is a good way to differentiate between:
> 1) one of these files is not present so must be regenerated, i.e
> if there is not a file (specialFolderPath("documents")&slash&tFilename)
> -- regenerate the file tFile at location specialFolderPath("documents")
> 2) The Server (//s1.somedomain.com/ is disconnected to down?
> So that in case (1) , we regenerate the file and in case (2) we present
> a warning that the server is disconnected or down?
> Mu gut says this should be simple, but I just can not wrap my brain
> around it today.
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
More information about the use-livecode