in reply to Re^2: system function
in thread system function

That error has nothing to do with system; it tells you you haven't declared @files.

In the code you show, you are setting @Logs but then trying to use @files. Since you didn't get an error on @Logs, I presume you declared it, and where you have @files you should change it to @Logs.