defyay defyay - 7 months ago 12
Ruby Question

How to copy current running script to another folder

I need my script to copy itself to another folder. I was trying to do it with

FileUtils
like this, but I don't know how to refer to the current file instead of
###
.

FileUtils.cp('###', 'C:\Users\Public\Documents')


Any ideas?

Answer
__FILE__

.....................