[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

exec command stops thread

Junkone

1/9/2008 2:14:00 PM

hello
i am trying to do the following
exec("copy e:\\data\\stocks\\watchlists\\*.* E:\\data\\MergedDb\watchlists\\*.*")
puts "copied"

My prog execution stops after exec is done. not sure why. how can i
run a command and continue processing after the command.
2 Answers

botp

1/9/2008 2:26:00 PM

0

On Jan 9, 2008 10:15 PM, Junkone <junkone1@gmail.com> wrote:
> exec("copy e:\\data\\stocks\\watchlists\\*.* E:\\data\\MergedDb> \watchlists\\*.*")
> puts "copied"
>
> My prog execution stops after exec is done. not sure why. how can i
> run a command and continue processing after the command.

when #exec executes, it will replace the (whole) current running
program/process; thus you wont reach the "puts copied" portion..

try system or the backticks "`"

Sebastian Hungerecker

1/9/2008 2:27:00 PM

0

Junkone wrote:
> My prog execution stops after exec is done. not sure why.

Because that's how exec works.

> how can i
> run a command and continue processing after the command.

system


HTH,
Sebastian
--
Jabber: sepp2k@jabber.org
ICQ: 205544826