defyay defyay - 1 year ago 47
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 Source
__FILE__

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