What's wrong with "exec"?

C

Cheyne Li

Hi, there

I use NETBEAN IDE 6.1. I tried to run CCC.exe by calling exec. But,
don't know why it keeps throwing error message,

"C:\Documents and Settings\cheynel\My
Documents\NetBeansProjects\task1\lib\fexc.rb:8: No such file or
directory - cannot execute (Errno::ENOENT)"

code is as following,

8 Dir.chdir("C:\\AAA\\BBB")
9 if File.exist?("CCC.exe")
10 puts "existed"
11 end
12 exec("CCC.exe")

Does any one have any idea what's wrong here? Thanks in advance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top