How can I copy file/s to host machine by specifying a target filepath to the location where the file will be placed and the ability to overwrite/replace all the files if necessary.
To overwrite existing files, you’d need to use the OS-specific shell commands.
For Windows, it would be something like
wait CMD.exe /c "xcopy /e /I /y "c:\source\path" "c:\target\path""