# Watch Files

### Inputs

This is a trigger node so it has no inputs.

### Outputs

The full filename of the file that actually changed is put into `msg.payload` and `msg.filename`, while a stringified version of the watch list is returned in `msg.topic`.

![](https://1551505950-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mkaq90Au3F8Kz0qIFzO%2Fuploads%2Fgit-blob-4e77d3526410cbe11f9758aac5650678015d827f%2Fimage.png?alt=media)

### Details

You can enter a list of comma separated directories and/or files. You will need to put quotes "..." around any that have spaces in.

On Windows you must use double back-slashes \\\ in any directory names.

The full filename of the file that actually changed is put into `msg.payload` and `msg.filename`, while a stringified version of the watch list is returned in `msg.topic`.

`msg.file` contains just the short filename of the file that changed. `msg.type` has the type of thing changed, usually *file* or *directory*, while `msg.size` holds the file size in bytes.

Of course in Linux, *everything* is a file and thus can be watched...

\*\*Note: \*\*The directory or file must exist in order to be watched. If the file or directory gets deleted it may no longer be monitored even if it gets re-created.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://maya-admin.gitbook.io/building-skills/product/node-library/storage/watch-files.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
