[SOLVED] Copy Files to a Different Location While Keeping the Structure

Ok so after a long battle trying to understand how things work, because of my 0 knowledge of scripting, I was able to make it work using rsync -R

Test Copy Files and Structure.kmmacros (22 KB)

Now I can't seem to figure this out, even though it's not relevant to this particular situation, but just so I can learn it: if my destination path inside the script uses a tilde, it will not work. What should I add for it to accept the tilde?
One workaround would be to set the destination path as a variable and then use that in the script, but I would like to know if there's a way to do it without the variable?