defyay defyay - 2 years ago 60
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__

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download