[R] DOS command using system

2006-01-26 Thread Taka Matzmoto
HI R users I have one question for using DOS command through system I like to delete a file that is located at C:\Program Files\DOSPROGRAM\input.dat I can use a DOS command del on Dos prompt like this C:\Documents and Settings del C:\Program Files\DOSPROGRAM\input.dat to delete input.dat file.

Re: [R] DOS command using system

2006-01-26 Thread jim holtman
Why don't you use 'unlink': unlink('c:/Program Files/DOSPROGRAM/input.dat') If you really want to use 'del', then you have to invoke the command processor: system('cmd /c del c:\\Program Files\\DOSPROGRAM\\input.dat') On 1/26/06, Taka Matzmoto [EMAIL PROTECTED] wrote: HI R users I have one

Re: [R] DOS command using system

2006-01-26 Thread Uwe Ligges
jim holtman wrote: Why don't you use 'unlink': unlink('c:/Program Files/DOSPROGRAM/input.dat') If you really want to use 'del', then you have to invoke the command processor: system('cmd /c del c:\\Program Files\\DOSPROGRAM\\input.dat') See also ?shell Uwe Ligges On 1/26/06, Taka