Possible Duplicate:
Enable dropping a file onto a Ruby script
I would like to have ruby open with dropped files as arguments. I running Win 7 Enterprise, Ruby 1.8.6 and have tried RubyDragAndDrop.dll, which I could not get installed. Any ideas?
Possible Duplicate:
Enable dropping a file onto a Ruby script
I would like to have ruby open with dropped files as arguments. I running Win 7 Enterprise, Ruby 1.8.6 and have tried RubyDragAndDrop.dll, which I could not get installed. Any ideas?
One alternative is to create a batch file that handles the drag and drop part. As seen here, when you drag and drop files onto a batch file, the list of dropped files will be stored in %*
as a space-separated list. A batch file that simply said ruby yourscript.rb %*
should take this list of files and pass it to your script (where you can access the arguments using the ARGS
array).