How to get long filename from ARGV
问题 I want to make a tool that takes some filenames as parameters, but when I use this code: ARGV.each do|a| puts "Argument: #{a}" end and I use drag and drop or "send to" in Windows, I get the short filename. So a file like "C:\Ruby193\bin\test\New Text Document.txt" becomes C:\Ruby193\bin\test\NEWTEX~1.TXT as the argument. There is no problem when I run the script from the commandline, with the longfilenames as parameters. How do i get the long filename when i use drag and drop or send to? 回答1: