Re: How do I prevent ruby on windows from automatically converting filename arguments?
- From: William James <w_a_x_man@xxxxxxxxx>
- Date: 30 Apr 2007 12:38:18 -0700
On Apr 30, 1:02 pm, robertlafe...@xxxxxxxxxxx wrote:
I have a Windows batch file (mytest.bat) that calls a Ruby script (mytest).
The mytest.bat looks like this:
ruby %TOOLDIR%\bin\mytest %*
When the batch file is called using "call mytest" from another Ruby script, it is automatically converting the command-line arguments. Specifically, it is converting path arguments:
mytest -i "\testdir\mytests\test.dat"
becomes
"/testdir/mytests/test.dat"
I do not want Ruby converting these paths.
Why not? Are you aware that even under windoze, if a program
written in Ruby or awk or Perl tries to open "/testdir/mytests/
test.dat",
it will do the right thing?
By the way, how is your program converting these paths?
Are you using File::expand_path?
.
- References:
- Prev by Date: Rails Web services (in general), HTTP GET and JSON and other topics
- Next by Date: run 'some' code as a different user? NET::SSH?
- Previous by thread: How do I prevent ruby on windows from automatically converting filename arguments?
- Next by thread: Rails Web services (in general), HTTP GET and JSON and other topics
- Index(es):