Test if the file exist

Bonjour

i want to know if a file exist on my application.
For my test i use fs-ops-access and it is ok if the parameter Filename is unchangeable.
But for my application i want to change dynamically the Filename property.
Can you help me ?

my node

[
{
"id": "df863d4.60fed4",
"type": "tab",
"label": "Flow 7",
"disabled": false,
"info": ""
},
{
"id": "27170ae.b550176",
"type": "fs-ops-access",
"z": "df863d4.60fed4",
"name": "",
"path": "Documents/Datas",
"pathType": "str",
"filename": "filecsv.cs",
"filenameType": "str",
"read": true,
"write": true,
"throwerror": true,
"x": 700,
"y": 420,
"wires": [
[
"39b43f98.6b1c8"
],
[
"3c84cbdc.0cf004"
]
]
},
{
"id": "ff561338.be1528",
"type": "inject",
"z": "df863d4.60fed4",
"name": "",
"topic": "",
"payload": "",
"payloadType": "date",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 320,
"y": 420,
"wires": [
[
"a18cc6af.01003"
]
]
},
{
"id": "39b43f98.6b1c8",
"type": "debug",
"z": "df863d4.60fed4",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"x": 880,
"y": 380,
"wires":
},
{
"id": "3c84cbdc.0cf004",
"type": "debug",
"z": "df863d4.60fed4",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"x": 870,
"y": 460,
"wires":
},
{
"id": "a18cc6af.01003",
"type": "function",
"z": "df863d4.60fed4",
"name": "",
"func": "msg={Filename :"filecsv.csv"};\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 490,
"y": 420,
"wires": [
[
"27170ae.b550176",
"cc12c5d4.1ccb08"
]
]
},
{
"id": "cc12c5d4.1ccb08",
"type": "debug",
"z": "df863d4.60fed4",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"x": 700,
"y": 600,
"wires":
}
]

Unfortunately your flow isn't currently importable.Please read the following post How to share code or flow json and then edit the above message.

Also what is the full name of the node you are using as "fs-ops-access" doesn't return any hits on flows.nodered.org

[{"id":"df863d4.60fed4","type":"tab","label":"Flow 7","disabled":false,"info":""},{"id":"27170ae.b550176","type":"fs-ops-access","z":"df863d4.60fed4","name":"","path":"Documents/Datas","pathType":"str","filename":"filecsv.cs","filenameType":"str","read":true,"write":true,"throwerror":true,"x":700,"y":420,"wires":[["39b43f98.6b1c8"],["3c84cbdc.0cf004"]]},{"id":"ff561338.be1528","type":"inject","z":"df863d4.60fed4","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":320,"y":420,"wires":[["a18cc6af.01003"]]},{"id":"39b43f98.6b1c8","type":"debug","z":"df863d4.60fed4","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":880,"y":380,"wires":[]},{"id":"3c84cbdc.0cf004","type":"debug","z":"df863d4.60fed4","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":870,"y":460,"wires":[]},{"id":"a18cc6af.01003","type":"function","z":"df863d4.60fed4","name":"","func":"msg={Filename :\"filecsv.csv\"};\nreturn msg;","outputs":1,"noerr":0,"x":490,"y":420,"wires":[["27170ae.b550176","cc12c5d4.1ccb08"]]},{"id":"cc12c5d4.1ccb08","type":"debug","z":"df863d4.60fed4","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":700,"y":600,"wires":[]}]

Pretty sure its this one...

@oli.nodered

You are trying to pass filename via msg.Filename but you have entered a fixed filename in the config...

image

This should be ...
image

to match up with your function...

msg={Filename :"filecsv.csv"};
return msg;

One suggestion - leave the msg object as it is & just set a property (helps further down the flow to see what the original msg was. E.g. use this in your function code...

msg.Filename = "filecsv.csv";
return msg;

Better still, use a change node...
image

Just merci
it is ok. that help for my futur application

Merci
Olivier