Re: automating reactions to file system changes

2018-12-08 Thread Jeremy Nicoll
On Sat, 8 Dec 2018, at 23:49, David Christensen wrote:

> On Linux, the inotify(7) is an alternative to polling:
> 
>  https://en.wikipedia.org/wiki/Inotify

Windows has event-driven ways to do this too, (one can]
google for, for example, WMI and PowerShell event-based
scripts)... but I'd have had to learn a whole lot more to do 
it that way.

What I wanted was an immediate solution to get me 
through a nightmare in music typesetting, not an excuse
to learn another programming language and more 
about Windows internals.

If the simple approach had been horrendously 
inefficient, I might have looked for a better method, 
but the overhead of doing it the way I did was negligible.

-- 
Jeremy Nicoll - my opinions are my own.



Re: automating reactions to file system changes

2018-12-08 Thread David Christensen

On 12/8/18 3:55 PM, Roberto C. Sánchez wrote:

On Sat, Dec 08, 2018 at 03:48:56PM -0800, David Christensen wrote:

On Linux, the inotify(7) is an alternative to polling:

 https://en.wikipedia.org/wiki/Inotify


Specifically, I have had very good success with incron.


Yes, incrond(8) and incrontab(5) look very appealing -- all you need is 
a shell script that accomplishes your goal; the C systems programming is 
taken care of for you.



David



Re: automating reactions to file system changes

2018-12-08 Thread Roberto C . Sánchez
On Sat, Dec 08, 2018 at 03:48:56PM -0800, David Christensen wrote:
> On Linux, the inotify(7) is an alternative to polling:
> 
> https://en.wikipedia.org/wiki/Inotify

Specifically, I have had very good success with incron.

Regards,

-Roberto

-- 
Roberto C. Sánchez



automating reactions to file system changes

2018-12-08 Thread David Christensen

On 12/8/18 2:53 PM, Jeremy Nicoll wrote:> On Sat, 8 Dec 2018, at 18:59,
Gene Heskett wrote:



... but the lack of a plainly marked, multiple step undo gets me
into a dead end box that results in a quit w/o save every time.


I had a similar problem with a music-typesetting package under 
Windows.


I guess a versioning file system (as discussed here fairly recently) 
would help, but I don't have one.


Eventually I solved it with a script which examines a set of files (I
specify a pattern for those) in the folder I'm working in.   When it
starts and every few seconds (eg 10 secs) afterwards, it looks at the
files whose name matches that pattern.

For every file it finds for which there is not a corresponding
backup copy, it makes one.

On Linux, the inotify(7) is an alternative to polling:

https://en.wikipedia.org/wiki/Inotify


David