Trying to move files via ExecuteStreamCommand
First attempt:
Command Arguments = ${absolute.path:append('*.log')};${absolute.path:append('logfiles')}
Command Path = /bin/mv
No working directory set
Execution error = /bin/mv: cannot stat â/path/input/*.logâ: No such file or directory
So I ran "/bin/mv /path/input/*.log /path/input/logfiles" from putty — no errors, files moved.
Second attempt:
Based on some online troubleshooting, e.g., https://unix.stackexchange.com/questions/77007/mv-cannot-stat-no-such-file-or-directory-in-shell-script
Same as first, but first argument changed to "${absolute.path}"*.log
Execution error = same as above, except double quotes around first path
Third attempt:
Command Arguments = *.log;logfiles
Command Path = /bin/mv
Working Directory = ${absolute.path}
Execution error = /bin/mv: cannot stat â*.logâ: No such file or directory
So in putty, I cd into /path/input and type "/bin/mv *.log logfiles" — no errors, files moved.
Many folks online having the same/similar problem say "my bad, I had the wrong path" or "my bad, the files aren't there". No, for me, the path is right, and the files are there. Attribs on files/folders are 777.
I'm using ExecuteStreamCommand all over the place with /bin/rm to delete files without any problem. This is the first time I'm trying to move files using /bin/mv.
At first, the special character was tripping me up, but then this (below) led me to believe it was not relevant to the problem, just a problem with Linux reporting the error using smart quotes and NiFi losing it in translation.
https://stackoverflow.com/questions/18081038/bad-character-showing-up-in-bash-script-execution
It takes a lot for me to reach out for help, so I'm hoping I'm not missing something really obvious.

