Very cool, @mrpasini !
For anyone who's interested, I also have another thread in this forum that goes into detail about issues dealing with destination paths with spaces, and an alternative to using curl.
For more information, see the wiki Searching the Forum for Answers section.