rejetto forum
Software => HFS ~ HTTP File Server => Programmers corner => Topic started by: dj.kruper on March 27, 2021, 10:27:48 PM
-
hi,
any chance I could set a macro to run a program on my server pc, when one particular file is requested or downloaded?
I already know how to do it with overall request or download, but I need this option just for one file, so that other downloads wouldn't trigger that exe file...
thank you :)
-
welcome,
something like this in events
[request completed]
{.add to log|%item-resource%.}
{.if|{.%item-resource%=\dj\apps\hfs2\test\changelog.txt.}|{:{.add to log|exec.}:}.}
-
is it necessary to add something to log?
doesn't seem to work for me
all I need is a program (might be notepad) started after for example file named "1.jpg" was requested or downloaded.
I tried something like this:
[download]
{.if|{.%item-resource%=\1.jpg.}|{:{.exec|notepad.}:}.}
but that doesn't work either...
thanks for any help
-
oh I figured it out, thank you
[download name]
{.if|{.%item-name%=1.jpg.}|{:{.exec|notepad.}:}.}
that's what I needed