rejetto forum

exec on download of 1 particular file? thank you

0 Members and 1 Guest are viewing this topic.

Offline dj.kruper

  • Occasional poster
  • *
    • Posts: 3
    • View Profile
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 :)


Offline dj

  • Tireless poster
  • ****
    • Posts: 291
  • 👣 🐾
    • View Profile
    • PWAs
welcome,

something like this in events

Code: [Select]
[request completed]
{.add to log|%item-resource%.}
{.if|{.%item-resource%=\dj\apps\hfs2\test\changelog.txt.}|{:{.add to log|exec.}:}.}


Offline dj.kruper

  • Occasional poster
  • *
    • Posts: 3
    • View Profile
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


Offline dj.kruper

  • Occasional poster
  • *
    • Posts: 3
    • View Profile
oh I figured it out, thank you

[download name]
{.if|{.%item-name%=1.jpg.}|{:{.exec|notepad.}:}.}

that's what I needed