That is possible, but unless you really need to do this serially then I see no need.
The node-red-contrib-fs-ops
nodes are really well designed and provide array functionality so that you can achieve the following:
Inject node (sends 1 message once per day) --> Log start --> Get files in folder (generates 1 message) --> Delete all files (1 final message) --> Log deleted files (1 message)
Demo flow (import using CTRL-I)
[{"id":"a8b41ecabdff9fcb","type":"fs-ops-dir","z":"afaa6118a7d8fb69","name":"get files","path":"path","pathType":"msg","filter":"filter","filterType":"msg","dir":"files","dirType":"msg","x":140,"y":280,"wires":[["94b282e95202854c","5febb380df7edb26"]]},{"id":"0c3d88fe82198d16","type":"cronplus","z":"afaa6118a7d8fb69","name":"0 0 13 * * * * (1pm, daily)","outputField":"payload","timeZone":"","storeName":"","commandResponseMsgOutput":"output1","defaultLocation":"","defaultLocationType":"default","outputs":1,"options":[{"name":"dir","topic":"dir","payloadType":"str","payload":"c:/temp/test","expressionType":"cron","expression":"0 0 13 * * * *","location":"","offset":"0","solarType":"all","solarEvents":"sunrise,sunset"}],"x":150,"y":200,"wires":[["babef6397f2590d1"]]},{"id":"94b282e95202854c","type":"debug","z":"afaa6118a7d8fb69","name":"starting: log it","active":true,"tosidebar":true,"console":true,"tostatus":true,"complete":"\"Deleting files \" & path & \"/\" & filter ","targetType":"jsonata","statusVal":"\"Deleting files \" & path & \"/\" & filter","statusType":"jsonata","x":420,"y":280,"wires":[]},{"id":"5febb380df7edb26","type":"fs-ops-delete","z":"afaa6118a7d8fb69","name":"delete files","path":"path","pathType":"msg","filename":"files","filenameType":"msg","x":190,"y":360,"wires":[["754412ba68952407","68bddcd5f651e991"]]},{"id":"babef6397f2590d1","type":"change","z":"afaa6118a7d8fb69","name":"set path and filter","rules":[{"t":"set","p":"path","pt":"msg","to":"c:/temp/test1","tot":"str"},{"t":"set","p":"filter","pt":"msg","to":"*","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":410,"y":200,"wires":[["a8b41ecabdff9fcb"]]},{"id":"754412ba68952407","type":"debug","z":"afaa6118a7d8fb69","name":"done: log it","active":true,"tosidebar":true,"console":true,"tostatus":true,"complete":"\"Deleted files \" & path & \"/\" & filter","targetType":"jsonata","statusVal":"\"Deleted files \" & path & \"/\" & filter","statusType":"jsonata","x":410,"y":360,"wires":[]},{"id":"68bddcd5f651e991","type":"debug","z":"afaa6118a7d8fb69","name":"done: (details)","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":420,"y":420,"wires":[]}]
But if you must do things as per your comment above, then that is easily achieved too:
Demo flow (import using CTRL-I)
[{"id":"6f655bc7839f8653","type":"cronplus","z":"afaa6118a7d8fb69","name":"0 0 13 * * * * (1pm, daily)","outputField":"payload","timeZone":"","storeName":"","commandResponseMsgOutput":"output1","defaultLocation":"","defaultLocationType":"default","outputs":1,"options":[{"name":"dir","topic":"dir","payloadType":"str","payload":"c:/temp/test","expressionType":"cron","expression":"0 0 13 * * * *","location":"","offset":"0","solarType":"all","solarEvents":"sunrise,sunset"}],"x":150,"y":980,"wires":[["2204334f94a2272b"]]},{"id":"2204334f94a2272b","type":"change","z":"afaa6118a7d8fb69","name":"set path and filter","rules":[{"t":"set","p":"path","pt":"msg","to":"c:/temp/test2","tot":"str"},{"t":"set","p":"filter","pt":"msg","to":"*","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":390,"y":980,"wires":[["61f9c1a1fc16f6cc"]]},{"id":"61f9c1a1fc16f6cc","type":"fs-ops-dir","z":"afaa6118a7d8fb69","name":"get files","path":"path","pathType":"msg","filter":"filter","filterType":"msg","dir":"files","dirType":"msg","x":140,"y":1060,"wires":[["dc5e41af6d682db5"]]},{"id":"8df70a1afc8fafcb","type":"fs-ops-delete","z":"afaa6118a7d8fb69","name":"delete file","path":"path","pathType":"msg","filename":"files","filenameType":"msg","x":180,"y":1140,"wires":[["b15c3cdece8f20c0","2ddb27cbc72ea43c"]]},{"id":"dc5e41af6d682db5","type":"split","z":"afaa6118a7d8fb69","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","property":"files","x":290,"y":1060,"wires":[["8df70a1afc8fafcb","4f3c109a6ecabb82"]]},{"id":"b15c3cdece8f20c0","type":"join","z":"afaa6118a7d8fb69","name":"","mode":"auto","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","useparts":false,"accumulate":true,"timeout":"","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":330,"y":1220,"wires":[["76ad9e589b07c4c8"]]},{"id":"4f3c109a6ecabb82","type":"debug","z":"afaa6118a7d8fb69","name":"Deleting file log","active":true,"tosidebar":true,"console":true,"tostatus":true,"complete":"\"Deleting file \" & files","targetType":"jsonata","statusVal":"\"Deleting file \" & files","statusType":"jsonata","x":510,"y":1060,"wires":[]},{"id":"2ddb27cbc72ea43c","type":"debug","z":"afaa6118a7d8fb69","name":"Deleted file log","active":true,"tosidebar":true,"console":true,"tostatus":true,"complete":"\"Deleted file \" & files","targetType":"jsonata","statusVal":"\"Deleted file \" & files","statusType":"jsonata","x":510,"y":1140,"wires":[]},{"id":"76ad9e589b07c4c8","type":"debug","z":"afaa6118a7d8fb69","name":"done: log it","active":true,"tosidebar":true,"console":true,"tostatus":true,"complete":"true","targetType":"full","statusVal":"\"Deleted files \" & path & \"/\" & filter","statusType":"jsonata","x":490,"y":1220,"wires":[]}]