hexagon logo

"Read only" file protection script?

Does anyone have any ideas on how to auto-magically mark all our .prg files as "read only"?
We're currently supposed to set our .prg's as read only when were done programming them but half the time we forget. This has caused some issues with unintentionally modified programs over the years (the machinists operate the CMM's here).

I'm thinking either a script that can be run once a day/week/etc, and will check all those boxes in our program folder, or a subroutine at the end of each program that will that that particular file as read only (but knowing the file name would have to be automated somehow).

And yes, despite many raised eyebrows at Hexagon, we run thousands of programs as read only and we run them off a server (not a local drive) across 11 different CMM's with no substantial issues. Stuck out tongue closed eyes
Parents
  • good Day,

    hm do you have no IT that can write such a script / mini exe?
    doesn't have to be in VBA / BASIC if you run it periodically (and don't start it via pcdmis).

    anyway, set file attributes is the keyword you should use on google + VBA if you really want it to be basic, that's relatively easy to do.
    Even if I don't have a working example at hand right now.
    The executing script/exe must have write access.

    it's really better if your IT writes you something like that instead of doing it yourself, then there are fewer problems
Reply
  • good Day,

    hm do you have no IT that can write such a script / mini exe?
    doesn't have to be in VBA / BASIC if you run it periodically (and don't start it via pcdmis).

    anyway, set file attributes is the keyword you should use on google + VBA if you really want it to be basic, that's relatively easy to do.
    Even if I don't have a working example at hand right now.
    The executing script/exe must have write access.

    it's really better if your IT writes you something like that instead of doing it yourself, then there are fewer problems
Children
No Data