Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run external program

Status
Not open for further replies.

geokor

Programmer
Aug 16, 2000
126
US
I am trying to build a cd based backup program in ruby. The idea is simple. I have a hard coded list of critical files I want backedup. A new backup directory is created each day using some name (e.g. Backup) along with the date and the critical files are copied to this directory.

I then enter the name of my ruby app in my cron or task scheduler, slip a cd into my burner, and at some hour in the middle of the night it's backed up.

I can do most of this but I havent found how I can call or run my cd-burner program and pass the directory name to it.

Can anyone point me in the right direction?

I run both win98 and linux so the answer can be for either. I prefer linux since I can backup my win98 files to the server (linux) first and then backup from there.

Thanks.

George K

 
Sounds like you need to use the (kernel) function system().

You pass the name of the external program to run and any arguments you want to pass to it:-

System("program", "directoryname")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top